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

RadContextMenu opens on second monitor!?

1 Answer 92 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Aug 2012, 11:58 AM
Hi folks,

when I open the contexMenu on a RadGrid on primary monitor, everything is fine.
When I dragging the Application on the second monitor, and open the context, the context will be shown in the top right of primary monitor?

Any ideas??

Thx for help

David

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosen Vladimirov
Telerik team
answered on 29 Aug 2012, 09:53 AM
Hello,

We would suggest you to use the following piece of code:

UIElement uiElement = (UIElement)sender;
contextMenu.Placement = PlacementMode.RelativePoint;
contextMenu.PlacementTarget = uiElement;
contextMenu.PlacementRectangle = new Rect(e.GetPosition(uiElement), new Size(0, 0));
contextMenu.IsOpen = true;
e.Handled = true;

This should do the work. Feel free to contact us if you still have any problems.

Kind regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ContextMenu
Asked by
David
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or