summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.WindowsUniversal
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-11-15 11:43:34 -0800
committerJason Smith <jason.smith@xamarin.com>2016-11-15 11:43:34 -0800
commit0cc2fd2b6742a29fedc03de942801cc14ff6b499 (patch)
tree2ce0f4adc438bd611931f6b8693a4b24482da9f8 /Xamarin.Forms.ControlGallery.WindowsUniversal
parent6bc6ee5c712b2d29402e895993e38b4666acc3f9 (diff)
downloadxamarin-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')
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml3
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml.cs20
-rw-r--r--Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj5
3 files changed, 25 insertions, 3 deletions
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml b/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml
index 89b2c563..d114d1a1 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/App.xaml
@@ -2,7 +2,8 @@
x:Class="Xamarin.Forms.ControlGallery.WindowsUniversal.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:Xamarin.Forms.ControlGallery.WindowsUniversal">
+ xmlns:local="using:Xamarin.Forms.ControlGallery.WindowsUniversal"
+ RequestedTheme="Light">
</Application>
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>
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
index 217fa0a1..7f0162f1 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
@@ -193,6 +193,11 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
+ <ItemGroup>
+ <SDKReference Include="WindowsMobile, Version=10.0.10586.0">
+ <Name>Windows Mobile Extensions for the UWP</Name>
+ </SDKReference>
+ </ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>