屏幕分辨率(C#Win 8.1 app)

时间:2014-02-24 18:50:30

标签: c# xaml windows-8.1

我正在为Windows 8.1开发应用程序,我需要获得设备屏幕的分辨率。

我搜索了论坛并找到了:

Window.Current.Bounds.Width
Window.Current.Bounds.Height

但这只返回应用程序窗口的分辨率。

1 个答案:

答案 0 :(得分:-2)

我猜你应该使用屏幕类

> Screen screen = Screen.PrimaryScreen;
> 
> int S_width=screen.Bounds.Width;
> 
> int S_height=screen.Bounds.Height;

表示stackoverflow上的几个地方