Disabling Right Click in RadWindow's modal background

2 posts, 0 answers
  1. Sherwin
    Sherwin avatar
    22 posts
    Member since:
    Jan 2011

    Posted 03 Feb 2012 Link to this post

    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
  2. Sherwin
    Sherwin avatar
    22 posts
    Member since:
    Jan 2011

    Posted 07 Feb 2012 Link to this post

    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;

    }

  3. DevCraft banner
Back to Top