c# - 如何获得屏幕的分辨率?对于 WinRT 应用程序?

标签 c# xaml windows-8 windows-runtime

我想知道屏幕分辨率,以便我可以根据 Windows 8 应用程序中的分辨率设置元素的高度。

最佳答案

这个怎么样?

var bounds = Window.Current.Bounds;

double height = bounds.Height;

double width = bounds.Width;

关于c# - 如何获得屏幕的分辨率?对于 WinRT 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10828179/

相关文章:

WPF 绑定(bind)自定义输出窗口

c# - ContentControl 上的绑定(bind)内容在 DataTemplateSelector 中为空

winapi - 屏幕键盘关闭按钮事件?

c# - 使用 C# 获取/设置 "File History"(Windows 8) 设置

c# - 正则表达式与 C# 中的预期不匹配

c# - 微软编码风格问题

c# - 如何将关键字 `where` 用于多个泛型类型?

c# - 将查询转换为 Lambda 表达式

c# - 更改默认按钮突出显示 WPF

android - 数据库兼容性 : Building a database to support apps across multiple OSs