2011/10/20

[WP7] SupportedOrientations OrientationChanged Event

this.OrientationChanged += (s, e) => { if (e.Orientation == PageOrientation.Landscape || e.Orientation == PageOrientation.LandscapeLeft || e.Orientation == PageOrientation.LandscapeRight) { TitlePanel.Visibility = System.Windows.Visibility.Collapsed; ContentPanel.SetValue(Grid.RowSpanProperty, 2); ContentPanel.SetValue(Grid.RowProperty, 0); } else { TitlePanel.Visibility = System.Windows.Visibility.Visible; ContentPanel.SetValue(Grid.RowSpanProperty, 1); ContentPanel.SetValue(Grid.RowProperty, 1); } };

댓글 없음:

댓글 쓰기

가장 많이 본 글