From 7467460deb0f8746deacb2cb719b56ba1e44b2d2 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Sun, 26 May 2019 23:20:48 -0400 Subject: [PATCH] Remove AboutFlyout workaround Conflicts with Xaml localization resolution changes. --- src/Calculator.Shared/Views/MainPage.xaml | 9 +++---- src/Calculator.Shared/Views/MainPage.xaml.cs | 27 ++++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/Calculator.Shared/Views/MainPage.xaml b/src/Calculator.Shared/Views/MainPage.xaml index 2fba9c78..264156d5 100644 --- a/src/Calculator.Shared/Views/MainPage.xaml +++ b/src/Calculator.Shared/Views/MainPage.xaml @@ -170,10 +170,9 @@ - - - + + + - + diff --git a/src/Calculator.Shared/Views/MainPage.xaml.cs b/src/Calculator.Shared/Views/MainPage.xaml.cs index e9a112c7..9977fbc4 100644 --- a/src/Calculator.Shared/Views/MainPage.xaml.cs +++ b/src/Calculator.Shared/Views/MainPage.xaml.cs @@ -62,22 +62,15 @@ namespace CalculatorApp double sizeInInches = 0.0; - // UNO TODO - //if (SUCCEEDED(GetIntegratedDisplaySize(&sizeInInches))) - //{ - // if (sizeInInches < 7.0) // If device's display size (diagonal length) is less than 7 inches then keep the calc always in Portrait mode only - // { - // DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped; - // } - //} - - //UNO_TODO /Workaround to have both the Text localisation and the glyph working on all platforms - var resourceLoader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView(); - if (AboutText != null) - { - AboutText.Text = resourceLoader.GetString("AboutButton/Content"); - } - } + // UNO TODO + //if (SUCCEEDED(GetIntegratedDisplaySize(&sizeInInches))) + //{ + // if (sizeInInches < 7.0) // If device's display size (diagonal length) is less than 7 inches then keep the calc always in Portrait mode only + // { + // DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped; + // } + //} + } protected override void OnNavigatedTo(NavigationEventArgs e) @@ -508,7 +501,7 @@ namespace CalculatorApp this.FindName("AboutPage"); } - AboutButton.ContextFlyout.ShowAt(AboutButton); + FlyoutBase.ShowAttachedFlyout(AboutButton); } void UnregisterEventHandlers()