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

Disable context menu on popup.

1 Answer 27 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michal
Top achievements
Rank 1
Michal asked on 28 Aug 2012, 01:47 PM
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

1 Answer, 1 is accepted

Sort by
0
Michal
Top achievements
Rank 1
answered on 01 Sep 2012, 01:46 PM
Still couldn't find a solution for this =[
Tags
Window
Asked by
Michal
Top achievements
Rank 1
Answers by
Michal
Top achievements
Rank 1
Share this question
or