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

Binding error for RibbonProperties.MouseOverBackground #500

Closed
znakeeye opened this issue Jan 14, 2018 · 4 comments
Closed

Binding error for RibbonProperties.MouseOverBackground #500

znakeeye opened this issue Jan 14, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@znakeeye
Copy link

I keep seeing this binding error when running my Ribbon application. How can you get rid of it?

System.Windows.Data Error: 40 : BindingExpression path error: '(Fluent:RibbonProperties.MouseOverBackground)' property not found on 'object' ''RibbonTabItem' (Name='')'. BindingExpression:Path=(Fluent:RibbonProperties.MouseOverBackground); DataItem='RibbonTabItem' (Name=''); target element is 'RibbonTabItem' (Name=''); target property is 'Background' (type 'Brush')

Using these themes:

<ResourceDictionary.MergedDictionaries>
  <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />
  <ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/Accents/Cobalt.xaml" />
</ResourceDictionary.MergedDictionaries>

I tried setting that attached property on my RibbonTabItems, but it didn't help.


Environment

  • Fluent.Ribbon v6.0.0-dev0171
  • Windows 10
  • .NET Framework 4.5.1
@batzen
Copy link
Member

batzen commented Jan 15, 2018

I observed the same when there was "only" .NET 4.5 or 4.6 installed.
Running on a machine having .NET 4.7 installed the error disappears.

In my case that just seemed to be a glitch in the .NET runtime and everything worked as expected regardless of the error.
Do the ribbon tab items have the proper mouse over effect on your machine? If that's the case you can safely ignore that error.

.NET sometimes seems to have problems resolving the attached property binding on the first try and succeeds on the following tries.

@znakeeye
Copy link
Author

Interesting! Though, the hover effect is not there. I tried setting the property to "Red" but my tabs are white no matter how much I hover them.

@batzen
Copy link
Member

batzen commented Jan 17, 2018

That's strange.
I absolutely can't reproduce this and it should work as it's valid xaml...
Any chance you can try this on a different machine with a different .net version?

@batzen
Copy link
Member

batzen commented Jan 21, 2018

Ok, i guess i found out what's causing this error.
Not adding Path= to the binding of an attached property sometimes can cause this issue.
Will fix it.

@batzen batzen self-assigned this Jan 21, 2018
@batzen batzen added this to the 6.0.0 milestone Jan 21, 2018
@batzen batzen closed this as completed in 21932fc Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants