Browse Source

Update when caption buttons are turned on or off.

demo1
Dan Walmsley 6 years ago
parent
commit
1ce5fdfd03
  1. 18
      src/Windows/Avalonia.Win32/WindowImpl.cs

18
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -748,6 +748,16 @@ namespace Avalonia.Win32
DisableCloseButton(_hwnd);
}
else
{
var style = GetStyle();
style |= (WindowStyles.WS_MINIMIZEBOX | WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_SYSMENU);
SetStyle(style);
EnableCloseButton(_hwnd);
}
}
else
{
@ -756,6 +766,14 @@ namespace Avalonia.Win32
_offScreenMargin = new Thickness();
_extendedMargins = new Thickness();
var style = GetStyle();
style |= (WindowStyles.WS_MINIMIZEBOX | WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_SYSMENU);
SetStyle(style);
EnableCloseButton(_hwnd);
}
ExtendClientAreaToDecorationsChanged?.Invoke(true);

Loading…
Cancel
Save