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:
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.
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.
Thanks Stenly 🙏🏻
The WPF Context Menu example pointed me in the right direction.