diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-11-15 11:43:34 -0800 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-11-15 11:43:34 -0800 |
commit | 0cc2fd2b6742a29fedc03de942801cc14ff6b499 (patch) | |
tree | 2ce0f4adc438bd611931f6b8693a4b24482da9f8 /Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs | |
parent | 6bc6ee5c712b2d29402e895993e38b4666acc3f9 (diff) | |
download | xamarin-forms-0cc2fd2b6742a29fedc03de942801cc14ff6b499.tar.gz xamarin-forms-0cc2fd2b6742a29fedc03de942801cc14ff6b499.tar.bz2 xamarin-forms-0cc2fd2b6742a29fedc03de942801cc14ff6b499.zip |
[UWP] Explicitly set mobile StatusBar colors to white Background/black Foreground on Light theme (#491)
* [UWP] Encapsulate MobileStatusBar
* [UWP] Set StatusBar colors on Light theme
* Add test code to override status bar color
Diffstat (limited to 'Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs b/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs index 62536444..e53b666f 100644 --- a/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs +++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs @@ -7,6 +7,9 @@ using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; +using Windows.Foundation.Metadata; +using Windows.UI; +using Windows.UI.ViewManagement; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; @@ -76,8 +79,21 @@ namespace Xamarin.Forms.ControlGallery.WindowsUniversal // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } - // Ensure the current window is active - Window.Current.Activate(); + + //// Uncomment to test overriding the status bar color + //if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) + //{ + // var statusBar = StatusBar.GetForCurrentView(); + // if (statusBar != null) + // { + // statusBar.BackgroundOpacity = 1; + // statusBar.BackgroundColor = Colors.Black; + // statusBar.ForegroundColor = Colors.White; + // } + //} + + // Ensure the current window is active + Window.Current.Activate(); } /// <summary> |