ContextMenuOpening event lost in Pane Client

6 posts, 1 answers
  1. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 03 Oct 2011 Link to this post

    I have a client control in my RadPanes that uses the ContextMenuOpening event to create dynamic menus if the user right clicks on images in the control. If the RadPane has the Right click ContexMenu with the dockable options my control does not get ContexMenuOpening events anymore.

    Solution for this is to set the ContextMenuTemplate to Null, but I would prefer to have the ContexMenuOpening event in my Control even if the RadPane has a ContextMenu. If my Control does not handle the ContextMenu event the RadPane could take it. May be this can be added to the wish list.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 06 Oct 2011 Link to this post

    Hello Pieter,

    I tried to reproduce the issue, but to no avail. Attached I am sending you a short video in which you can observe my attempt.
    Could you please try with the latest available internal build. If you still experience the issue, could you please try to isolate it in a sample project and send it back to us. In that way we will be able to track down the source of the problem and provide you with solution.

    All the best,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 09 Oct 2011 Link to this post

    Hi Konstantina,

    Following your video I cannot reproduce the problem either, and that is using version 2011.2.0815.40.
    The code in which the problem is occuring is entangled in a lot of code that I'm not allowed to make public.
    I'll try to figure out what's the difference between the working example and my current application that's having this problem.

  5. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 12 Oct 2011 Link to this post

    I found out when the problem occurs.
    If you have a usercontrol as content of a RadPane the ContexMenuOpening events are lost.

    An example of this can be found here in Pane 2
  6. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 14 Oct 2011 Link to this post

    Hello Pieter,

    In order to make it work, you need to first handle the opening event and then open the menu manually, as otherwise we are hooking to this event.
    Attached I am sending you your project with the corrections made.

    Hope this is helpful.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  7. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 16 Oct 2011 Link to this post

    Thanks, that just did the trick!

    Pieter
Back to Top
UI for WPF is Visual Studio 2017 Ready