Fix GetAppViewState

This commit is contained in:
Jérôme Laban 2019-05-17 10:52:59 -04:00
commit becbbf81b6

View file

@ -106,8 +106,12 @@ namespace CalculatorApp
public static string GetAppViewState() public static string GetAppViewState()
{ {
String newViewState; String newViewState;
CoreWindow window = CoreWindow.GetForCurrentThread(); #if NETFX_CORE
if ((window.Bounds.Width >= 560) && (window.Bounds.Height >= 356)) 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; newViewState = ViewState.DockedView;
} }