New to Telerik UI for WinForms? Download free 30-day trial

ToolTips

There are two ways to assign tool tips to elements in RadMap, namely setting the ToolTipText property of a MapVisualElement, or as in most of the RadControls by using the ToolTipTextNeeded event of RadMap.

Setting tool tips of MapVisualElements

The code snippet below demonstrates how you can assign a tool tip to zoom out button in RadMap.

Using the ToolTipText property

this.radMap1.ShowItemToolTips = true;
this.radMap1.MapElement.NavigationBarElement.ZoomOutButton.ToolTipText = "Zoom out";

Figure 1: Tool tip assigned by using the ToolTipText property

WinForms RadMap Tool tip assigned by using the ToolTipText property

Setting tool tips in the ToolTipTextNeeded event

The code snippet below demonstrates how you can use ToolTipTextNeeded event handler to set ToolTipText for the given MapVisualElement.

Using the ToolTipTextNeeded event

private void radMap1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
    MapZoomInButton zoomInButton  = sender as MapZoomInButton;
    if ( zoomInButton!=null)
    {
        e.ToolTipText = "Zoom in";
    }
}

Figure 2: Tool tip assigned by using the ToolTipTextNeeded event

WinForms RadMap Tool tip assigned by using the ToolTipTextNeeded event

The ToolTipTextNeeded event has higher priority and overrides the tool tips set by the ToolTipText property of MapVisualElements.