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}"
|
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
</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"
|
||||||
Closed="OnAboutFlyoutClosed"
|
Closed="OnAboutFlyoutClosed"
|
||||||
|
@ -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>
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue