Remove AboutFlyout workaround

Conflicts with Xaml localization resolution changes.
This commit is contained in:
David Oliver 2019-05-26 23:20:48 -04:00
commit 7467460deb
2 changed files with 14 additions and 22 deletions

View file

@ -170,9 +170,8 @@
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}" <FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
Glyph="&#xe946;" /> Glyph="&#xe946;" />
</NavigationViewItem.Icon> </NavigationViewItem.Icon>
<TextBlock Text=""
x:Name="AboutText" /> <FlyoutBase.AttachedFlyout>
<NavigationViewItem.ContextFlyout>
<Flyout x:Name="AboutPageFlyout" <Flyout x:Name="AboutPageFlyout"
x:Uid="AboutPageFlyout" x:Uid="AboutPageFlyout"
@ -183,7 +182,7 @@
<local:AboutFlyout x:Name="AboutPage" <local:AboutFlyout x:Name="AboutPage"
x:Load="False" /> x:Load="False" />
</Flyout> </Flyout>
</NavigationViewItem.ContextFlyout> </FlyoutBase.AttachedFlyout>
</NavigationViewItem> </NavigationViewItem>
</NavigationViewList.Items> </NavigationViewList.Items>
</NavigationViewList> </NavigationViewList>

View file

@ -62,22 +62,15 @@ namespace CalculatorApp
double sizeInInches = 0.0; double sizeInInches = 0.0;
// UNO TODO // UNO TODO
//if (SUCCEEDED(GetIntegratedDisplaySize(&sizeInInches))) //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 // 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; // 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");
}
}
protected override void OnNavigatedTo(NavigationEventArgs e) protected override void OnNavigatedTo(NavigationEventArgs e)
@ -508,7 +501,7 @@ namespace CalculatorApp
this.FindName("AboutPage"); this.FindName("AboutPage");
} }
AboutButton.ContextFlyout.ShowAt(AboutButton); FlyoutBase.ShowAttachedFlyout(AboutButton);
} }
void UnregisterEventHandlers() void UnregisterEventHandlers()