About Ribbon localized strings

Ribbon for WPF Forum

Posted 2 years ago by Albert Vishnevsky
Version: 21.1.3
Avatar

Hi Guys!

I have a question about resources.

I found that I can setup ToolTips for ribbon:ToggleMinimizationButton
by using: UIScreenTipToggleMinimizationDownHeader;
UIScreenTipToggleMinimizationDownDescription;
UIScreenTipToggleMinimizationUpHeader;
UIScreenTipToggleMinimizationUpDescription.

It works perfectly.

But in my case I want to replace these string with the binding.
I don't find the template where these strings assign to controls.

Could you clarify me which the file (in studio styles) responses for this?
Or how can I access to them by Template in code?

Thank you very much.

[Modified 2 years ago]

Comments (4)

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

Hi Albert,

Those particular string resources get pulled in our code on the button's state change.  To alter them, you'd have to programmatically set a custom string to each string resource at app startup.  This documentation topic covers that process.

There also is a helpful String Resource Browser off the View menu in the Sample Browser app.  It lets you browse strings and on the right side, allows you to generate the SetCustomString call to customize them.


Actipro Software Support

Posted 2 years ago by Albert Vishnevsky
Avatar

Hi,

Thank you for so a quick replay.
Yes, I know this.
The info that I wrote above from your string resource browser.
But it does not fit to my case, because I cannot change the language of my app without restart it.
So to change text to another language I change your static resources to the bind properies.
It works for me for example for tooltips close, minimize, restore for RibbonWindow and for dock, close for ToolWindow.
I can see what control uses your string resourse, so I can find it by name in template and binding to "my property".
 
But I asked you about "special" strings that I cannot find in studio-styles that my company got from yours.
So I ask you the same questions:
Could you clarify me which the file (in studio styles) responses for this?
Or how can I access to them by name in Template in code?
 
Thanks,
Albert
Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Albert,

I can explain a little more.  The ToggleMinimizationButton control doesn't have those particular string resources set in XAML.  They are set to the ToggleMinimizationButton.ScreenTipHeader and ScreenTipDescription properties programmatically in a private UpdateState method that occurs in various scenarios.  Toggling of the Ribbon.IsMinimized property triggers that UpdateState method to execute, and within that, update the ScreenTipHeader and ScreenTipDescription properties based on if the Ribbon is currently minimized or not.

You could probably toggle the Ribbon.IsMinimized property to the opposite value and back to get them to refresh with the new string resources. 

Or you could try and locate the ToggleMinimizationButton in the visual tree and update the ScreenTipHeader / ScreenTipDescription properties directly based on the current Ribbon.IsMinimized state.  When the IsMinimized state changes later, the current (customized) string resource values will be pulled.


Actipro Software Support

Posted 2 years ago by Albert Vishnevsky
Avatar

Hi,

Thank you for a good idea.

Best regards,

Albert

The latest build of this product (v24.1.1) 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.