зеркало из https://github.com/DeGsoft/maui-linux.git
Removed hard reference to StatusBar, changed to type name to prevent crash when StatusBar type is not present (#144)
This commit is contained in:
Родитель
8a00a96ffb
Коммит
6b9adc7459
|
@ -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();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче