WPF Localization Extension with actipro Ribbon

Ribbon for WPF Forum

Posted 6 years ago by Marc Ambrosius
Version: 13.1.0581
Avatar

Hi,

we are using WPF Localization Extension inside our application. This works good, but actipro ribbon elements do not change texts if the language is changed at runtime.

Example:

If we use your ribbon controls like this, the text of the resource "Name" never changes:

<ribbon:Group>
<ribbon:StackPanel>
<ribbon:ComboBox Label="{lex:Loc Name}" Height="15" Width="50" />
</ribbon:StackPanel>
</ribbon:Group>

If we do the same with standard controls, everything works as expected, thanks to the localization extension the text changes whenever the language is changed:

<ribbon:Group>
<StackPanel Orientation="Vertical">
<Label Content="{lex:Loc Name}" />
<ComboBox Height="15" Width="50" />
</StackPanel>
</ribbon:Group>

Is it possible to change texts on your ribbon controls at runtime using localization?

Thanks in advance

Marc

Comments (5)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

I think the problem here is that the labels for ribbon:ComboBox are actually rendered outside of the control itself.  The containing panel is rendering them.  So the panel is probably not getting the invalidation.  Try calling Group.InvalidateVariants() on the ribbon:Group after the language change and see if that helps.


Actipro Software Support

Posted 6 years ago by Marc Ambrosius
Avatar

Thanks for your answer. Calling Group.InvalidateVariants() on the ribbon:Group actually changed the language. We have already made a similar workaround.

But we were hoping for a better solution. With WPF Localize Extension we do not really need to care about language changes. The texts are updated automatically without us having to catch an event and calling Invalidate. In a bigger project there is good chance that this will be forgotten somewhere.

Do you have any idea how we can get actipro controls working together with WPF Localize Extension?

[Modified 6 years ago]

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

There's nothing else you can do with the current codebase.  We have updated the code for the next maintenance release to invalidate the measure on the containing StackPanel in this scenario.  That seems to resolve the issue.


Actipro Software Support

Posted 6 years ago by Marc Ambrosius
Avatar

Thanks again. When do you expect the next maintenance release?

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

It should be out in the next several weeks.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.