RadContextMenu opens on second monitor!?

2 posts, 1 answers
  1. David
    David avatar
    23 posts
    Member since:
    Jan 2012

    Posted 28 Aug 2012 Link to this post

    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


  2. Answer
    Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 29 Aug 2012 Link to this post


    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.

Back to Top