获取屏幕大小
this.ScreenWidth = System.Windows.Application.Current.Host.Content.ActualWidth;
this.ScreenHeight = System.Windows.Application.Current.Host.Content.ActualHeight;

这是动态绑定的方法

Height="{Binding ElementName=LayoutRoot,Path=ActualHeight}"

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2021-05-23
  • 2021-05-23
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-08-15
  • 2021-07-03
  • 2021-10-02
相关资源
相似解决方案