mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Remove AboutFlyout workaround
Conflicts with Xaml localization resolution changes.
This commit is contained in:
parent
a7839d2ffe
commit
7467460deb
2 changed files with 14 additions and 22 deletions
|
@ -170,10 +170,9 @@
|
|||
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
|
||||
Glyph="" />
|
||||
</NavigationViewItem.Icon>
|
||||
<TextBlock Text=""
|
||||
x:Name="AboutText" />
|
||||
<NavigationViewItem.ContextFlyout>
|
||||
|
||||
|
||||
<FlyoutBase.AttachedFlyout>
|
||||
|
||||
<Flyout x:Name="AboutPageFlyout"
|
||||
x:Uid="AboutPageFlyout"
|
||||
Closed="OnAboutFlyoutClosed"
|
||||
|
@ -183,7 +182,7 @@
|
|||
<local:AboutFlyout x:Name="AboutPage"
|
||||
x:Load="False" />
|
||||
</Flyout>
|
||||
</NavigationViewItem.ContextFlyout>
|
||||
</FlyoutBase.AttachedFlyout>
|
||||
</NavigationViewItem>
|
||||
</NavigationViewList.Items>
|
||||
</NavigationViewList>
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue