-
Notifications
You must be signed in to change notification settings - Fork 7
WindowCaptionButtonThemeWorkaround
HO-COOH edited this page Mar 22, 2026
·
2 revisions
| Name | IsDependencyProperty | Description |
|---|---|---|
Window |
❌ |
Microsoft.UI.Xaml.Window property. |
When you have Window.ExtendsContentIntoTitleBar(true), the caption buttons often comes out with broken color regarding to theme.
This helper fixed it by working as a hidden control and listens to theme change message, and make corresponding changes to caption buttons.
To use, simply put it under a Xaml control (such as Grid) that can accept child contents.
<Window>
...
<Grid x:Name="RootGrid">
<essential:WindowCaptionButtonThemeWorkaround Window="{x:Bind}" />
<-- Other contents -->
</Grid>
</Window>| Before | After |
|---|---|
![]() |
![]() |

