-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Milestone
Description
After messing around with custom MetroWindow and WindowCommands styles I found a bug that disables Foreground property change for every WindowCommands' buttons and therefore keeps me from applying my custom style. If I have a style defined like this:
<Style x:Key="CleanMetroWindowStyle"
TargetType="{x:Type controls:MetroWindow}"
BasedOn="{StaticResource {x:Type controls:MetroWindow}}">
<Setter Property="OverrideDefaultWindowCommandsBrush"
Value="{DynamicResource BlackBrush}" />
<Setter Property="TitleForeground"
Value="{DynamicResource BlackBrush}" />
<Setter Property="WindowTitleBrush"
Value="{DynamicResource TransparentWhiteBrush}" />
<Setter Property="NonActiveWindowTitleBrush"
Value="{DynamicResource TransparentWhiteBrush}" />
<Setter Property="WindowMinButtonStyle"
Value="{DynamicResource CleanMetroWindowButtonStyle}" />
<Setter Property="WindowMaxButtonStyle"
Value="{DynamicResource CleanMetroWindowButtonStyle}" />
<Setter Property="WindowCloseButtonStyle"
Value="{DynamicResource CustomCloseWindowButtonStyle}" />
</Style>
And when I change Foreground property of WindowCommands' buttons like this:
<controls:MetroWindow.RightWindowCommands>
<controls:WindowCommands Foreground="Red">
<Button Content="Button 1"
Foreground="Red" />
<Button Content="Button 2"
Foreground="Red" />
</controls:WindowCommands>
</controls:MetroWindow.RightWindowCommands>
nothing changes and the buttons stay black. If I remove that setter, everything works as expected. So as a workaround I set the color manually in all of my custom styles.
I hope this can be fixed since it's a nice solution to simply change the color but for now it doesn't allow any further modifications to be made.
Metadata
Metadata
Assignees
Labels
No labels