Removed hard reference to StatusBar, changed to type name to prevent crash when StatusBar type is not present (#144)

This commit is contained in:
Nick Gamroth 2016-04-27 13:58:24 -05:00 коммит произвёл Rui Marinho
Родитель 8a00a96ffb
Коммит 6b9adc7459
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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();