Skip to content
Prev Previous commit
Next Next commit
Fix titlebar coloring.
  • Loading branch information
Nuklon committed Nov 10, 2025
commit 00a8e8170ed3811f15bb68bd7e1ad159676fa680
2 changes: 1 addition & 1 deletion src/Wpf.Ui/Controls/Window/WindowBackdrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public static unsafe bool RemoveTitlebarBackground(Window? window)
{
// NOTE: https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
// Specifying DWMWA_COLOR_DEFAULT (value 0xFFFFFFFF) for the color will reset the window back to using the system's default behavior for the caption color.
uint titlebarPvAttribute = PInvoke.DWMWA_COLOR_DEFAULT;
uint titlebarPvAttribute = PInvoke.DWMWA_COLOR_NONE;

return PInvoke.DwmSetWindowAttribute(new HWND(windowSource.Handle),
DWMWINDOWATTRIBUTE.DWMWA_CAPTION_COLOR,
Expand Down
2 changes: 1 addition & 1 deletion src/Wpf.Ui/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ITaskbarList4
TaskbarList
DWM_SYSTEMBACKDROP_TYPE
DWM_WINDOW_CORNER_PREFERENCE
DWMWA_COLOR_DEFAULT
DWMWA_COLOR_NONE
WINDOW_STYLE
WTA_OPTIONS
WTNCA_*