diff --git a/src/WinUIEx/HwndExtensions.cs b/src/WinUIEx/HwndExtensions.cs index 44bd44a..9c987a4 100644 --- a/src/WinUIEx/HwndExtensions.cs +++ b/src/WinUIEx/HwndExtensions.cs @@ -238,7 +238,7 @@ public static void ToggleWindowStyle(IntPtr hWnd, bool visible, WindowStyle styl var currentStyle = PInvoke.GetWindowLong(h, WINDOW_LONG_PTR_INDEX.GWL_STYLE); var newStyle = currentStyle; if (visible) - newStyle = (newStyle & (int)style); + newStyle = (newStyle | (int)style); else newStyle = (newStyle & ~(int)style); var r = PInvoke.SetWindowLong(h, WINDOW_LONG_PTR_INDEX.GWL_STYLE, newStyle);