public Page()
{
InitializeComponent();
App.Current.Host.Content.Resized += new EventHandler(Content_Resized);
App.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);
this.ResizeFrame();
}
void Content_FullScreenChanged(object sender, EventArgs e)
{
this.ResizeFrame();
}
void Content_Resized(object sender, EventArgs e)
{
this.ResizeFrame();
}
void ResizeFrame()
{
(this as UserControl).Width = App.Current.Host.Content.ActualWidth;
(this as UserControl).Height = App.Current.Host.Content.ActualHeight;
}
void FullScreenMode()
{
App.Current.Host.Content.IsFullScreen = !App.Current.Host.Content.IsFullScreen;
}
作者:nasa
出处:nasa.cnblogs.com
联系:nasa_wz@hotmail.com
QQ:12446006