获取当前屏幕的缩放比例,dpi
Graphics currentGraphics = Graphics.FromHwnd(new WindowInteropHelper(Window.GetWindow(this)).Handle); double dpixRatio = currentGraphics.DpiX / 96;
Graphics currentGraphics = Graphics.FromHwnd(new WindowInteropHelper(Window.GetWindow(this)).Handle); double dpixRatio = currentGraphics.DpiX / 96;