如何确定使用C#屏幕宽/高 [英] How to determine the screen width/height using C#

查看:129
本文介绍了如何确定使用C#屏幕宽/高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个窗口的宽度/高度动态基础上,用户屏幕最大宽度/高度。我该如何编程方式确定该

I want to set the Width/Height of a Window dynamically based on the User Screens maximum width/height. How can I determine this programmatically.

推荐答案

有关主屏幕:

System.Windows.SystemParameters.PrimaryScreenWidth
System.Windows.SystemParameters.PrimaryScreenHeight

请注意,也有它取决于多种因素,其他一些主要的屏幕相关的属性,全* &放大器; Maximised * 的)

(Note that there are also some other primary screen related properties which depend on various factors, Full* & Maximised*)

虚拟屏幕:

SystemParameters.VirtualScreenWidth
SystemParameters.VirtualScreenHeight

这篇关于如何确定使用C#屏幕宽/高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆