add DpiAware for demo

This commit is contained in:
NaBian committed 2021-01-27 23:32:15 +08:00
1 parent f56772447d
commit 2fadc54c53
13 files changed
+106 -23

No files matched your search

@@ -137,7 +137,7 @@ namespace HandyControl.Tools
var autoHide = InteropMethods.SHAppBarMessage(4, ref appBarData) != 0;
#if NET40
return WindowResizeBorderThickness.Add(new Thickness(autoHide ? -8 : 0));
#elif Core
#elif NETCOREAPP
var hdc = InteropMethods.GetDC(IntPtr.Zero);
var scale = InteropMethods.GetDeviceCaps(hdc, InteropValues.DESKTOPVERTRES) / (float)InteropMethods.GetDeviceCaps(hdc, InteropValues.VERTRES);
InteropMethods.ReleaseDC(IntPtr.Zero, hdc);