C# で wpf を使用して GUI を設計しています。xaml コードから画面サイズ (幅と高さの値) を取得したいと考えています。
私はC#コードからそれらを取得する方法を知っていました
Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
XAML
しかし、コードからそれらを取得する方法がわかりません。