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

[RadContextMenu] Getting 'original-source'

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
norm
Top achievements
Rank 1
norm asked on 15 Dec 2009, 07:07 AM

Hello guys!

I'd like to know how i can get the 'original-source' in the RadContextMenu ItemClick event. I have multiple buttons - how can i get the Context-Menu clicked button?

There is a private field ((System.Windows.Controls.Button)(((System.Windows.DependencyObject)(((Telerik.Windows.Controls.RadContextMenu)(sender)).UIElement))._treeParent))
That is my desired Button, how can i get this Button regular?

thanks,
best regards
george

1 Answer, 1 is accepted

Sort by
0
norm
Top achievements
Rank 1
answered on 15 Dec 2009, 07:13 AM
Hello, it's easy:)

Button btnClicked = ((Telerik.Windows.Controls.RadContextMenu)(sender)).GetClickedElement<Button>();

Have a nice Day!
Tags
General Discussions
Asked by
norm
Top achievements
Rank 1
Answers by
norm
Top achievements
Rank 1
Share this question
or