我想在Windows Phone应用程序中更改页面方向时播放MediaElement全屏。当页面方向重复然后播放器正常工作时我也会申请。
答案 0 :(得分:0)
您可以在此活动中对页面进行任何更改:
void MainPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
{
if (e.Orientation == PageOrientation.LandscapeLeft || e.Orientation == PageOrientation.LandscapeRight)
{
mediaPlayer.Height = Double.NaN;
mediaPlayer.Width = Double.NaN;
mediaPlayer.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
mediaPlayer.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
SystemTray.IsVisible = false;
}
else
{
}
}