diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/BehaviorsGalleryPage.cs b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/BehaviorsGalleryPage.cs index 6132d060a3..4fbcb787f1 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/BehaviorsGalleryPage.cs +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/BehaviorsGalleryPage.cs @@ -1,4 +1,5 @@ -using CommunityToolkit.Maui.Sample.ViewModels.Behaviors; +using CommunityToolkit.Maui.Behaviors; +using CommunityToolkit.Maui.Sample.ViewModels.Behaviors; namespace CommunityToolkit.Maui.Sample.Pages.Behaviors; @@ -7,5 +8,18 @@ public class BehaviorsGalleryPage : BaseGalleryPage public BehaviorsGalleryPage(IDeviceInfo deviceInfo, BehaviorsGalleryViewModel behaviorsGalleryViewModel) : base("Behaviors", deviceInfo, behaviorsGalleryViewModel) { +#if ANDROID || IOS + AddStatusBarBehavior(); +#endif + } + + void AddStatusBarBehavior() + { + Behaviors.Add(new StatusBarBehavior + { + StatusBarColor = Color.FromRgb(25, 118, 210), + StatusBarStyle = Core.StatusBarStyle.LightContent, + ApplyOn = StatusBarApplyOn.OnPageNavigatedTo, + }); } } \ No newline at end of file diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBarBehaviorPage.xaml b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBarBehaviorPage.xaml index 6f90c362f5..3bb0f52bda 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBarBehaviorPage.xaml +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBarBehaviorPage.xaml @@ -115,11 +115,10 @@