From becbbf81b6fe34f9776166fe99cc940e30271263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 17 May 2019 10:52:59 -0400 Subject: [PATCH] Fix GetAppViewState --- src/Calculator.Shared/App.xaml.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Calculator.Shared/App.xaml.cs b/src/Calculator.Shared/App.xaml.cs index dac57e65..bf38c091 100644 --- a/src/Calculator.Shared/App.xaml.cs +++ b/src/Calculator.Shared/App.xaml.cs @@ -106,8 +106,12 @@ namespace CalculatorApp public static string GetAppViewState() { String newViewState; - CoreWindow window = CoreWindow.GetForCurrentThread(); - if ((window.Bounds.Width >= 560) && (window.Bounds.Height >= 356)) +#if NETFX_CORE + CoreWindow window = CoreWindow.GetForCurrentThread(); +#else + var window = Windows.UI.Xaml.Window.Current; +#endif + if ((window.Bounds.Width >= 560) && (window.Bounds.Height >= 356)) { newViewState = ViewState.DockedView; }