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,10 +170,9 @@
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
Glyph="&#xe946;" />
</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>

View file

@ -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()