MouseOverBackground not Set in TitleBar style
Describe the bug
The MouseOverBackground is referenced here https://github.com/lepoco/wpfui/blob/f59daa02e4c4818989d7f95dbb4bcb95b279b747/src/Wpf.Ui/Controls/TitleBar/TitleBar.xaml#L18 But I find nowhere at latter TitleBar style setting
To Reproduce
Load the gallery project and run the gallery application. We will see multiple (4 in my case) bind failures.
Expected behavior
No bind failures
Screenshots
No response
OS version
Win 10 19045.4170
.NET version
Same as repo
WPF-UI NuGet version
Same as repo
Additional context
Temporary Workaround for user:
<ui:TitleBar>
<ui:TitleBar.Resources>
<Style TargetType="ui:TitleBarButton" BasedOn="{StaticResource {x:Type ui:TitleBarButton}}">
<Setter Property="MouseOverButtonsForeground" Value="Black" />
</Style>
</ui:TitleBar.Resources>
</ui:TitleBar>
Got it. By the way, what do you want in your issue? Did you want to change all the TitleBarButton MouseOverButtonsForeground in one time?
Got it. By the way, what do you want in your issue? Did you want to change all the TitleBarButton MouseOverButtonsForeground in one time?
Maybe not, the title buttons have different functionalities. Usually the close button background is red and foreground white when hovered, while the others foreground is black. Not pertty sure since I not good at UI design. Provide a way to set different button's color should be good.
ThemesDictionary Theme="Dark" TitleBar Button Foreground Is Black
Is this what you want?
<ui:TitleBar
x:Name="TitleBar"
Title="{Binding ViewModel.ApplicationTitle}"
Grid.Row="0"
CloseWindowByDoubleClickOnIcon="True">
<ui:TitleBar.Resources>
<Style TargetType="ui:TitleBarButton" BasedOn="{StaticResource {x:Type ui:TitleBarButton}}">
<Setter Property="ButtonsForeground" Value="Red" />
<Setter Property="MouseOverButtonsForeground" Value="Blue" />
</Style>
</ui:TitleBar.Resources>
<ui:TitleBar.Icon>
<ui:ImageIcon Source="pack://application:,,,/Assets/wpfui.png" />
</ui:TitleBar.Icon>
</ui:TitleBar>