我有一个特殊的问题。当我将 SupportedOrientations 设置为 SupportedPageOrientation.Landscape 时,它会自动将方向更改为 LandscapeLeft,但是当我尝试将其更改为 SupportedPageOrientation.Portrait 时,它会停留在 LandscapeLeft。
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
switch (Settings.OrientationLock)
{
case OrientationLock.Rotate:
this.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
break;
case OrientationLock.HorizontalLock:
this.SupportedOrientations = SupportedPageOrientation.Landscape;
break;
case OrientationLock.VerticalLock:
this.SupportedOrientations = SupportedPageOrientation.Portrait;
break;
}
...
base.OnNavigatedTo(e);
}
提前致谢。