lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.03k stars 666 forks source link

TitleBarButton not found in xaml (Binding Error) #1093

Open Jlim01 opened 1 month ago

Jlim01 commented 1 month ago

Describe the bug

Hi, I followed [https://github.com/lepoco/wpfui/issues/935] this resolve. and then the first view theme became Dark mode. yea, this is what i want. The program runs, but the minimize, maximize, and close buttons initially become a Dark foregurd rather than a theme-optimized white foreground. And a binding error appeared as below. What's interesting is that when I mouse over those buttons, it turns white.

How should I solve this problem? Is there anything that could cause the binding error? I can't do anything about it because the buttons in the titlebar are provided by wpf-ui.

[Binding error]

  1. Systehttp://m.windows.data/ Error: 40 : BindingExpression path error: 'MouseOverButtonsForeground' property not found on 'object' ''TitleBar' (Name='TitleBar')'. BindingExpression:Path=MouseOverButtonsForeground; DataItem='TitleBar' (Name='TitleBar'); target element is 'TitleBarButton' (Name='PART_HelpButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')

  2. Systehttp://m.windows.data/ Error: 40 : BindingExpression path error: 'MouseOverButtonsForeground' property not found on 'object' ''TitleBar' (Name='TitleBar')'. BindingExpression:Path=MouseOverButtonsForeground; DataItem='TitleBar' (Name='TitleBar'); target element is 'TitleBarButton' (Name='PART_MinimizeButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')

  3. Systehttp://m.windows.data/ Error: 40 : BindingExpression path error: 'MouseOverButtonsForeground' property not found on 'object' ''TitleBar' (Name='TitleBar')'. BindingExpression:Path=MouseOverButtonsForeground; DataItem='TitleBar' (Name='TitleBar'); target element is 'TitleBarButton' (Name='PART_MaximizeButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')

  4. Systehttp://m.windows.data/ Error: 40 : BindingExpression path error: 'MouseOverButtonsForeground' property not found on 'object' ''TitleBar' (Name='TitleBar')'. BindingExpression:Path=MouseOverButtonsForeground; DataItem='TitleBar' (Name='TitleBar'); target element is 'TitleBarButton' (Name='PART_CloseButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')

To Reproduce

pass.

Expected behavior

I didn't Expect. because I tried new wpf-ui app. and this is successed. but I applied my project Im doing and then run program. the result is that Screenshots result same. It changes from dark to white only after I raise the mouse on the button (close || minimum || maximum window buttons).

Screenshots

image image

minimum button is that after mouse over on minimum button. so foreground(brush) color is white. other is not mouse over so It's still Dark.

OS version

win 11

.NET version

.net 8.0

WPF-UI NuGet version

3.03

Additional context

No response