Disable context menu on popup.

2 posts, 0 answers
  1. Michal
    Michal avatar
    9 posts
    Member since:
    Aug 2012

    Posted 28 Aug 2012 Link to this post

    Ok

    I'm struggling with this for 2 days.
    My task is to disable default context menu in the entire application.
    I can't do this in html in javascript, because in some cases I want to have my own context menu.

    So I added the RightMouseButtonDown event handler to my MainPage.xaml so it handles the click.
    It works just fine until I open any of the popups (RadWindow).
    I figured out that the event wasn't propagated to the MainPage because RadWindow doesn't have Parent set.
    My handler isn't catching the event, and the context menu appears.
    I added the same handlers to my RadWindow and it works fine inside the window, but it isn't working for the background.
    How do I get to the background?
    RadWindow doesn't have parent.

    I figured out that RadWindows popup are handled by the 'host' (of class MultiplePopupWindowHost) which is in the base class of RadWindow : WindowBase
    but it is internal and I can't get access to it.

    How can I attach any handlers to the background of RadWindow?
    How is it connected with the main visual tree?

    Thank you for any help

    PS. We use Q3 2011 v. of controls.

    EDIT: screen
  2. Michal
    Michal avatar
    9 posts
    Member since:
    Aug 2012

    Posted 01 Sep 2012 Link to this post

    Still couldn't find a solution for this =[
  3. DevCraft banner
Back to Top