RadRibbonView - how to loop through controls

0 Answers 25 Views
RibbonView and RibbonWindow
Curt
Top achievements
Rank 1
Iron
Curt asked on 29 Dec 2023, 10:03 PM

Hello

I have a RadRibbonView that I would like to set some properties, and assign events, through the page code-behind.

e.g, setting the text on the various RadMenuItems in the Ribbon.

 

Any suggestions or help on how to do this is appreciated.

Thanks!

 

Stenly
Telerik team
commented on 01 Jan 2024, 03:39 PM

Since I am not familiar with your setup, one approach would be, if the RadMenuItem instances are defined in XAML, to assign them names using the x:Name property, which will allow you to retrieve them in code-behind.

If the above approach is not a possibility, an alternative one would be to use a data-binding scenario as shown in the following article:

WPF ContextMenu - Binding to Dynamic Data - Telerik UI for WPF

If both of these suggestions are not applicable to your current scenario, may I ask if you could share more information about your setup? For example, a simplified version of the way that the elements are defined.

Curt
Top achievements
Rank 1
Iron
commented on 03 Jan 2024, 06:28 PM

Thanks Stenly  🙏🏻

The WPF Context Menu example pointed me in the right direction.

No answers yet. Maybe you can help?

Tags
RibbonView and RibbonWindow
Asked by
Curt
Top achievements
Rank 1
Iron
Share this question
or