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

Values from DependencyProperties with FrameworkPropertyMetadataOptions.Inherits are not properly inherited from Ribbon to Menu, StartScreen and some other children #428

Closed
incureforce opened this issue Apr 24, 2017 · 11 comments
Assignees
Labels
Milestone

Comments

@incureforce
Copy link

The Backstage Control does not detect a Language change in the parent Window (inheritance problem?)

Workaround:

<f:Backstage Language="{Binding ElementName=wndName, Path=Language}" />

Environment

  • Fluent.Ribbon v5.0.1.10
  • Windows 10
  • .NET Framework 4.5.2
@batzen
Copy link
Member

batzen commented Apr 24, 2017

There is no Language property on Backstage. Localization, of strings specific to this library, is done through bindings to RibbonLocalization.

There were issues regarding DataContext, and thus Bindings, in the Backstage and some other areas which are already fixed in version 6.0 which is currently in development.

@incureforce
Copy link
Author

incureforce commented Apr 25, 2017

The Language property is inherited from Backstage > RibbonControl > Control > FrameworkElement, but somehow it isn't passed properly through the DependencyObject logical tree. My best guess is that either it is set directly in between or the inheritance chain from the DependencyProperty is disjointed. Snoop shows that on the Adorner Layer its value state is default and not inherited.

Edited: Maybe it is already fixed in 6.0 but if not it should have been noted and fixed later on. - also i use this property thats how i found it out.

@batzen
Copy link
Member

batzen commented Apr 29, 2017

Ah, wasn't aware of the Language property as i've never written localized applications and localization in Fluent.Ribbon is making use of that property.

Just tested if setting Language on TestWindow (in the showcase application of v6.0) gets inherited by the Backstage and it does so.

@batzen
Copy link
Member

batzen commented Apr 29, 2017

Oh, but it only gets the initial value. Changes are not inherited. Will have a look.

@batzen batzen self-assigned this Apr 29, 2017
@batzen batzen added this to the 6.0.0 milestone Apr 29, 2017
@batzen
Copy link
Member

batzen commented Apr 30, 2017

This is related to #415 but requires a different fix. That fix will make the fix done for #415 obsolete.

@batzen batzen changed the title Backstage Language changing at runtime Values from DependencyProperties with FrameworkPropertyMetadataOptions.Inherits are not properly inherited from Ribbon to Menu, StartScreen and some other children Apr 30, 2017
@batzen
Copy link
Member

batzen commented Apr 30, 2017

@incureforce Thanks for reporting this as this forced me to rethink my solution for #415 and finally fix the issue in a future proof way instead of fixing it the lazy way. I still have to ask someone at Microsoft why this happens, as it should not have happened initially...

@incureforce
Copy link
Author

Thank you, for working on the weekend to fix this. 👍

@batzen
Copy link
Member

batzen commented Apr 30, 2017

Well, working on the weekend is often the only time i can work on this project. ;-)

@batzen batzen closed this as completed in 20680a5 Apr 30, 2017
@batzen
Copy link
Member

batzen commented Apr 30, 2017

Should be fixed.
Could you give it a try and report back if it's really fixed?
I wrote automated tests for this, but you never know...

@incureforce
Copy link
Author

Yes it works as it should. Thank you very much.

@batzen
Copy link
Member

batzen commented Apr 30, 2017

You are welcome. :-)

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