方向代码不起作用,但它是正确的
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.Landscape)
{
webBrowser1.Visibility = System.Windows.Visibility.Collapsed;
}
else
{
}
}
这是应用程序调用定向模式的代码:
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True" OrientationChanged="PhoneApplicationPage_OrientationChanged">
为什么?