获取屏幕大小
this.ScreenWidth = System.Windows.Application.Current.Host.Content.ActualWidth;this.ScreenHeight = System.Windows.Application.Current.Host.Content.ActualHeight;
这是动态绑定的方法
Height="{Binding ElementName=LayoutRoot,Path=ActualHeight}"
本文共 308 字,大约阅读时间需要 1 分钟。
获取屏幕大小
this.ScreenWidth = System.Windows.Application.Current.Host.Content.ActualWidth;this.ScreenHeight = System.Windows.Application.Current.Host.Content.ActualHeight;
这是动态绑定的方法
Height="{Binding ElementName=LayoutRoot,Path=ActualHeight}"
转载于:https://www.cnblogs.com/Yukang1989/archive/2012/11/30/2796086.html