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

Rightclick on RadWindow?

1 Answer 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michael Chong
Top achievements
Rank 1
Michael Chong asked on 07 Oct 2009, 09:34 AM
I'm currently using RadControls_for_Silverlight_2009_2_0812_DEV. I set a content with RadContextMenu to a RadWindow. When I open multiple window and try to right click get the contextmenu from an unactive window, the contextmenu will popup but the window will not become active. Any solution that I can make the window become active when rightclick it? I have tried a solution by setting the RadWindow.BringToFront() on the RadContextMenu.Opened event but the window becomes active only after the contextmenu popup so the contextmenu is shown behind the window. Anyone has a better idea?

By the way, I would like to know whether there is a latest build or release on RadControls for Silverlight 3.

Thanks for any help and information.

1 Answer, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 08 Oct 2009, 07:07 AM
Hello Michael,

I could suggest you is to use Mouse.AddMouseDownHandler method to add MouseDown handler to the RadWindow and to bring it to the front when this event is fired. I suggest you to inherit the RadWindow control and do this in its constructor. Here is an example:
public class RadWindowWithContextMenu : RadWindow 
    public RadWindowWithContextMenu() 
    { 
        InitializeComponent(); 
        Mouse.AddMouseDownHandler(thisnew EventHandler<Telerik.Windows.Input.MouseButtonEventArgs>(OnMouseButtonDown)); 
    } 
 
    private void OnMouseButtonDown(object sender, Telerik.Windows.Input.MouseButtonEventArgs e) 
    { 
        this.BringToFront(); 
    } 

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Michael Chong
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or