mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-23 06:25:19 -07:00
[iOS] Misc fixes
This commit is contained in:
parent
ca2fd21a4a
commit
4a84523351
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -573,7 +573,7 @@ namespace CalculatorApp.ViewModel
|
||||||
|
|
||||||
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
|
m_decimalSeparator = LocalizationSettings.GetInstance().GetDecimalSeparator();
|
||||||
|
|
||||||
#if !__WASM__
|
#if !__WASM__ && !__IOS__
|
||||||
if (CoreWindow.GetForCurrentThread() != null)
|
if (CoreWindow.GetForCurrentThread() != null)
|
||||||
{
|
{
|
||||||
// Must have a CoreWindow to access the resource context.
|
// Must have a CoreWindow to access the resource context.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue