WPF获取系统dpi
var dpiX = (int)typeof(SystemParameters).GetProperty("DpiX", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null, null);
var dpiY = (int)typeof(SystemParameters).GetProperty("Dpi", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null, null);
来源:https://stackoverflow.com/a/12487917/7068790
标签:GetProperty,int,获取,BindingFlags,WPF,null,dpi From: https://www.cnblogs.com/hupo376787/p/16727754.html