How to display a contextmenu on rightclick

2 posts, 1 answers
  1. Sumith Jayasuriya
    Sumith Jayasuriya avatar
    25 posts
    Member since:
    Jan 2010

    Posted 15 Jul 2011 Link to this post

    Is contextmenu enabled for RadMap for Silverlight?  If YES which version of RadControls?

     If NO, is there an alternative way to handle right mouse click and display a menu?

  2. Answer
    Andrey avatar
    1681 posts

    Posted 20 Jul 2011 Link to this post

    Hello Sumith,

    Yes, RadContextMenu can be used now with RadMap for Silverlight. You may try it with our latest Q2 2011 binaries - for example:

    <UserControl x:Class="DetectShapeAtLocation.MainPage"
         d:DesignHeight="400" d:DesignWidth="400">
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadMap x:Name="RadMap1"
                    <telerik:OpenStreetMapProvider />
                        <telerik:RadMenuItem Header="Menu 1" Click="MenuItemClicked" />

    private Location menuLocation = Location.Empty;
    private void MenuItemClicked(object sender, Telerik.Windows.RadRoutedEventArgs e)
        if (!this.menuLocation.IsEmpty)
            // Perform operation
    private void MapMouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        e.Handled = true;
    private void MapMouseRightButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        this.menuLocation = Location.GetCoordinates(this.RadMap1, e.GetPosition(this.RadMap1));

    Best wishes,
    Andrey Murzov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft R3 2016 release webinar banner
Back to Top