【发布时间】:2013-07-02 12:10:04
【问题描述】:
我在 C# 上使用 wpf 来设计 GUI,我想从 xaml 代码中获取屏幕尺寸(宽度和高度的值)。
我知道如何从 C# 代码中获取它们
Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
但我不知道如何从XAML 代码中获取它们。
【问题讨论】: