I'm using wpf on C# to design GUI, and I want to get screen size (The value of Width and Height) from xaml code.
I knew how to get them from C# code as
Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
But I don't know how to get them from XAML
code.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…