PhoneApplicationPage 之观察
PhoneApplicationPage 的属性 Landscape" Orientation="Portrait"在landscape 和portrait 之间变化的时候 会触发内部控件的大小的改变 触发SizeChanged事件
private void ContentPanel_SizeChanged(object sender, SizeChangedEventArgs e)
{
txtblk.Text = String.Format("ContentPanel size: {0}\n" +
"TitlePanel size: {1}\n" +
"LayoutRoot size: {2}\n" +
"MainPage size: {3}\n" +
"Frame size: {4}",
e.NewSize,
new Size(TitlePanel.ActualWidth, TitlePanel.ActualHeight),
new Size(LayoutRoot.ActualWidth, LayoutRoot.ActualHeight),
new Size(this.ActualWidth, this.ActualHeight),
Application.Current.RootVisual.RenderSize);
}