Click Modes

The RadMap supports both single and double mouse clicks. It provides you with a predefined behaviors for them out of the box. The possible values are to be found in the MouseBehavior enumeration:

  • Center - positions the clicked or double clicked point into the center of the map.

  • None - the click or double click does nothing.

  • ZoomPointToCenter - zooms in to the clicked or double clicked point and positions it into the center of the map.

  • ZoomToPoint - zooms in to the clicked or double clicked point.

In order to configure the behavior for the single click you have to set the MouseClickMode property. For the double click mode set the MouseDoubleClickMode property.

Here is an example:

<telerik:RadMap x:Name="radMap" 
                MouseClickMode="Center" 
                MouseDoubleClickMode="ZoomToPoint" / 

If you want to implement a custom behavior for one or both of them, just set the respective mode to None and handle the respective event:

Also you can set these properties to None in order to prevent the users from zooming. Additionally setting the MouseDragMode property to None will disable them from panning.

<telerik:RadMap x:Name="radMap" 
                MouseClickMode="None" 
                MouseDoubleClickMode="None" 
                MapMouseClick="radMap_MapMouseClick" 
                MapMouseDoubleClick="radMap_MapMouseDoubleClick" /> 

private void radMap_MapMouseClick( object sender, MapMouseRoutedEventArgs e ) 
{ 
    //implement logic regarding single click here 
} 
private void radMap_MapMouseDoubleClick( object sender, MapMouseRoutedEventArgs e ) 
{ 
    //implement logic regarding double click here 
} 
Private Sub radMap_MapMouseClick(sender As Object, e As MapMouseRoutedEventArgs) 
 'implement logic regarding single click here' 
End Sub 
Private Sub radMap_MapMouseDoubleClick(sender As Object, e As MapMouseRoutedEventArgs) 
 'implement logic regarding double click here' 
End Sub 

See Also

In this article