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

ContextMenu item binding

1 Answer 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Silvia Bumper
Top achievements
Rank 1
Silvia Bumper asked on 11 Jul 2011, 09:56 AM

Hi

  How do I bind  ContextMenu sub MenuItem  CommandParameter to the item that was right click on to open the context menu ?

couldn't find a ContextMenu forum so i hope this is the right place

thanks

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 12 Jul 2011, 10:00 AM
Hi Open Mind,

You could use RadContextMenu Opening or Opened event to get clicked element.
Then you could update a property of your ViewModel with the clicked element. RadMenuItem CommandParameter will be bound to this property.

We use a similar approach in our RadContextMenu FirstLook demo:
http://demos.telerik.com/silverlight/beta/#ContextMenu/FirstLook

Kind regards,
Hristo
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
Silvia Bumper
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or