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

ContextMenu

1 Answer 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Salzlechner
Top achievements
Rank 1
Michael Salzlechner asked on 27 Sep 2011, 08:11 PM
i am trying to create one global ContextMenu in code behind that is used by a number of different classes/controls

i am using

RadContextMenu

 

 

.SetContextMenu(myTextBox, myMenu);

 


the menu does show on different controls. in my example i have a few RadMaskedInput and a few TextBox controls

but when i check the UIElement in the ItemClick event of the menu it points to i think the first one that called it or something like that but not the one that i clicked on

any help would be appreciated

Mike






1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 30 Sep 2011, 05:32 PM
Hi Michael Salzlechner,

When setting the same RadContextMenu on different elements the UIElement will always return the last item that it is attached to. If it is attached to myTextBox element last it will always return this element. Unfortunately this is a limitation of Silverlight and there is no way to workaround ti.

Greetings,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
General Discussions
Asked by
Michael Salzlechner
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or