Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TitleBarButton not found in xaml (Binding Error) #1093

Open
Jlim01 opened this issue May 19, 2024 · 0 comments
Open

TitleBarButton not found in xaml (Binding Error) #1093

Jlim01 opened this issue May 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Jlim01
Copy link

Jlim01 commented May 19, 2024

Describe the bug

Hi, I followed [https://github.com//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

@Jlim01 Jlim01 added the bug Something isn't working label May 19, 2024
@Jlim01 Jlim01 changed the title TitleBarButton not found TitleBarButton not found in xaml (Binding Error) May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant