[RadContextMenu] Getting 'original-source'

2 posts, 0 answers
  1. norm
    norm avatar
    6 posts
    Member since:
    Jun 2008

    Posted 15 Dec 2009 Link to this post


    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

  2. norm
    norm avatar
    6 posts
    Member since:
    Jun 2008

    Posted 15 Dec 2009 Link to this post

    Hello, it's easy:)

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

    Have a nice Day!
Back to Top