This is a migrated thread and some comments may be shown as answers.

[Solved] Binding MenuItems

1 Answer 63 Views
RadialMenu for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wim
Top achievements
Rank 1
Wim asked on 31 Dec 2013, 01:04 PM
Hi,

Is it possible to add the menuitems dynamically ?
I was trying to apply binding to the Items property of the menu, but it seems that property is read-only.

<telerikPrimitives:RadRadialContextMenu.Behavior>
                    <telerikPrimitives:RadialMenuTriggerBehavior AttachTriggers="PressedOrFocused" />
                </telerikPrimitives:RadRadialContextMenu.Behavior>
                <telerikPrimitives:RadRadialContextMenu.Menu>
                    <telerikPrimitives:RadRadialMenu Items="{Binding BucketConfigurationTypes}"/>
                </telerikPrimitives:RadRadialContextMenu.Menu>

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 01 Jan 2014, 09:06 AM
Hello Wim,

Yes, you can add MenuItems dynamically, but the RadRadialMenu.Items is not a dependency property and it also has only a  get accessor. So you can add an item like this:
this.radialMenu.Items.Add(new RadialMenuItem() { Header = "new item" });

I hope this helps. Let me know should you have any other questions or suggestions.

Regards,
Ivaylo Gergov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RadialMenu for XAML
Asked by
Wim
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or