Removed hard reference to StatusBar, changed to type name to prevent crash when Statu...
authorNick Gamroth <thebeekeeper@gmail.com>
Wed, 27 Apr 2016 18:58:24 +0000 (13:58 -0500)
committerRui Marinho <me@ruimarinho.net>
Wed, 27 Apr 2016 18:58:24 +0000 (14:58 -0400)
Xamarin.Forms.Platform.WinRT/Platform.cs

index 4d7309d..6c158a0 100644 (file)
@@ -76,8 +76,9 @@ namespace Xamarin.Forms.Platform.WinRT
 
                        UpdateBounds();
 
+
 #if WINDOWS_UWP
-                       if (ApiInformation.IsTypePresent(typeof(StatusBar).ToString()))
+                       if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
                        {
                                StatusBar statusBar = StatusBar.GetForCurrentView();
                                statusBar.Showing += (sender, args) => UpdateBounds();
@@ -417,7 +418,7 @@ namespace Xamarin.Forms.Platform.WinRT
                {
                        _bounds = new Rectangle(0, 0, _page.ActualWidth, _page.ActualHeight);
 #if WINDOWS_UWP
-                       if (ApiInformation.IsTypePresent(typeof(StatusBar).ToString()))
+                       if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
                        {
                                StatusBar statusBar = StatusBar.GetForCurrentView();