ContextMenu

2 posts, 0 answers
  1. Michael Salzlechner
    Michael Salzlechner avatar
    41 posts
    Member since:
    Jan 2010

    Posted 27 Sep 2011 Link to this post

    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






  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 30 Sep 2011 Link to this post

    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 >>

Back to Top