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.
The binding for the TitleBarButton's MouseOverButtonForeground is incorrect shows the following error in output:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Wpf.Ui.Controls.TitleBarButton', AncestorLevel='1''. BindingExpression:Path=MouseOverButtonsForeground; DataItem=null; target element is 'TitleBarButton' (Name='PART_HelpButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Wpf.Ui.Controls.TitleBarButton', AncestorLevel='1''. BindingExpression:Path=MouseOverButtonsForeground; DataItem=null; target element is 'TitleBarButton' (Name='PART_MinimizeButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Wpf.Ui.Controls.TitleBarButton', AncestorLevel='1''. BindingExpression:Path=MouseOverButtonsForeground; DataItem=null; target element is 'TitleBarButton' (Name='PART_MaximizeButton'); target property is 'MouseOverButtonsForeground' (type 'Brush')
Pull request type
Please check the type of change your PR introduces:
[ ] Update
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
What is the current behavior?
Current behavior is that the binding does not work.
Issue Number: N/A
What is the new behavior?
The property binding is now successful with no errors in output.
Other information
Minor change. Have been busy but created a new project and saw this error in the output window and figured I'd just fix it really quick.
As always let me know if you have any questions but this is pretty straightforward since MouseOverButtonsForeground is a property of the TitleBarButton itself and not the TitleBar so the RelativeSource just needed to be set to Self.
The binding for the TitleBarButton's MouseOverButtonForeground is incorrect shows the following error in output:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Current behavior is that the binding does not work.
Issue Number: N/A
What is the new behavior?
The property binding is now successful with no errors in output.
Other information
Minor change. Have been busy but created a new project and saw this error in the output window and figured I'd just fix it really quick.
As always let me know if you have any questions but this is pretty straightforward since
MouseOverButtonsForeground
is a property of theTitleBarButton
itself and not theTitleBar
so theRelativeSource
just needed to be set toSelf
.