fixed #325
This commit is contained in:
1 parent
1fa4c20a91
commit
f4a0c6fd4f
7 files changed
+112
-30
No files matched your search
@@ -132,15 +132,17 @@ namespace HandyControl.Tools
|
||||
{
|
||||
get
|
||||
{
|
||||
InteropValues.APPBARDATA appBarData = default;
|
||||
var autoHide = InteropMethods.SHAppBarMessage(4, ref appBarData) != 0;
|
||||
#if netle40
|
||||
return WindowResizeBorderThickness;
|
||||
return WindowResizeBorderThickness.Add(new Thickness(autoHide ? -8 : 0));
|
||||
#elif Core
|
||||
var hdc = InteropMethods.GetDC(IntPtr.Zero);
|
||||
var scale = InteropMethods.GetDeviceCaps(hdc, InteropValues.DESKTOPVERTRES) / (float)InteropMethods.GetDeviceCaps(hdc, InteropValues.VERTRES);
|
||||
InteropMethods.ReleaseDC(IntPtr.Zero, hdc);
|
||||
return WindowResizeBorderThickness.Add(new Thickness(4 * scale));
|
||||
return WindowResizeBorderThickness.Add(new Thickness((autoHide ? - 4 : 4) * scale));
|
||||
#else
|
||||
return WindowResizeBorderThickness.Add(new Thickness(4));
|
||||
return WindowResizeBorderThickness.Add(new Thickness(autoHide ? - 4 : 4));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user