1、引入命名空间:
using System.Windows;
2、没有任务栏的工作区域
Width = SystemParameters.WorkArea.Width;
Height = SystemParameters.WorkArea.Height;
3、主显示器全屏窗口工作区域,在屏幕缩放比不等于100%的情况下使用
Width = SystemParameters.FullPrimaryScreenWidth;
Height = SystemParameters.FullPrimaryScreenHeight;
4、主显示器的工作区域
Width = (int)SystemParameters.PrimaryScreenWidth;
Height = (int)SystemParameters.PrimaryScreenHeight;
wpf 获取屏幕分辨率
最新推荐文章于 2024-10-30 16:31:19 发布
682

被折叠的 条评论
为什么被折叠?



