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

Disabling Right Click in RadWindow's modal background

1 Answer 43 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sherwin
Top achievements
Rank 1
Sherwin asked on 04 Feb 2012, 12:00 AM
Hello,

In RadWindow's "MODAL" background, you can right click and the Silverlight menu will appear. Is it possible to disable this right click?

Thanks,
Sherwin

1 Answer, 1 is accepted

Sort by
0
Sherwin
Top achievements
Rank 1
answered on 07 Feb 2012, 05:57 PM
Solution:

public RadWindow()

{

InitializeComponent();

MouseRightButtonDown += BGWindow_MouseRightButtonDown;

Loaded += BGWindowLoaded;

 

}

 

 

private void BGWindowLoaded(object sender, RoutedEventArgs e)

{

 

 

var modalBackground = this.ParentOfType<Canvas>();

 

 

if (modalBackground != null)

modalBackground.MouseRightButtonDown += BGWindow_MouseRightButtonDown;

}

 

private void BGWindow_MouseRightButtonDown(object sender, MouseButtonEventArgs e)

{

e.Handled =

 

 

true;

}

Tags
Window
Asked by
Sherwin
Top achievements
Rank 1
Answers by
Sherwin
Top achievements
Rank 1
Share this question
or