Skip to content

Commit

Permalink
IndicatorView fluent method added in CarouselViewExtension.
Browse files Browse the repository at this point in the history
Ensure FmgLibContentPage Runs in DEBUG Configuration
  • Loading branch information
gonultasmf committed Aug 17, 2024
1 parent bd4b25b commit 9af4201
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions libs/FmgLib.MauiMarkup/Extensions/CarouselViewExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,12 @@ public static SettersContext<T> VisibleViews<T>(this SettersContext<T> self, Fun
return self;
}

public static T IndicatorView<T>(this T self, Microsoft.Maui.Controls.IndicatorView indicatorView) where T : Microsoft.Maui.Controls.CarouselView
{
self.IndicatorView = indicatorView;
return self;
}

public static T OnCurrentItemChanged<T>(this T self, System.EventHandler<Microsoft.Maui.Controls.CurrentItemChangedEventArgs> handler)
where T : Microsoft.Maui.Controls.CarouselView
{
Expand Down
2 changes: 1 addition & 1 deletion libs/FmgLib.MauiMarkup/FmgLib.MauiMarkup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageId>FmgLib.MauiMarkup</PackageId>
<Summary>FmgLib.MauiMarkup with C# Markup classes and fluent helper methods</Summary>
<Title>FmgLib.MauiMarkup</Title>
<Version>8.6.6</Version>
<Version>8.6.7</Version>
<Authors>FmgYazılım</Authors>
<Company>Fmg Yazılım</Company>
<Copyright>©2024</Copyright>
Expand Down
17 changes: 14 additions & 3 deletions libs/FmgLib.MauiMarkup/Pages/ContentPage.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
namespace FmgLib.MauiMarkup;
using System.Diagnostics;

namespace FmgLib.MauiMarkup;

public abstract class FmgLibContentPage : ContentPage, IFmgLibHotReload
{
protected FmgLibContentPage()
{
FmgLibHotReloadHandler.UpdateApplicationEvent += ReloadUI;
if (Debugger.IsAttached)
{
FmgLibHotReloadHandler.UpdateApplicationEvent += ReloadUI;
}

Build();
}

Expand All @@ -26,7 +32,12 @@ public abstract class FmgLibContentPage<TViewModel> : FmgLibContentPage, IFmgLib
protected FmgLibContentPage(TViewModel viewModel)
{
base.BindingContext = viewModel;
FmgLibHotReloadHandler.UpdateApplicationEvent += ReloadUI;

if (Debugger.IsAttached)
{
FmgLibHotReloadHandler.UpdateApplicationEvent += ReloadUI;
}

Build();
}
}

0 comments on commit 9af4201

Please sign in to comment.