Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Collapse]End-User Interaction
     Highlighting
     Selection
     Tooltips
     Printing and Exporting
     Scrolling and Zooming
   [Expand]Examples
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Tooltips

The Map control supports map tooltips. Tooltips can be used to provide map items with additional information.

The following image illustrates a tooltip attached to a vector item generated from a shapefile.

Note

To learn how to obtain data from a shapefile, refer to the Load Vector Data from a Shapefile help topic.

This topic consists of the following sections.

Expanded Enable Tooltips

To enable tooltips for a map, set the MapControl.ToolTipEnabled property to true.

Expanded Customize the Tooltip Appearance

To configure the tooltip appearance, use the ways described below.

  • When you need to modify tooltip text patterns for all vector layer items, use the VectorLayerBase.ToolTipPattern property.

    The image above demonstrates the tooltip, showing the name of the country and its population. For this, enclose in brackets the corresponding attributes obtained from vector data files to define the ToolTipPattern property.

  • Use the MapItem.ToolTipPattern property to set a pattern of text displayed in tooltips for each individual vector element. To configure tooltip content, use map item attributes stored in the MapItem.Attributes collection.

    To show vector item attribute data in a tooltip, use the following code.

  • The VectorLayerBase.ToolTipContentTemplate property specifies the presentation of the tooltip content for a vector element.

    Note

    To learn how to modify the tooltip content, refer to the How to: Show Tooltips for Map Shapes example.

  • The MapControl.ToolTipTemplate property defines how tooltips will be displayed. Assign a DataTemplate object to this property to configure a custom form of tooltips.

    Note

    To learn how to configure a custom map tooltip shape, refer to the How to: Implement a Custom Map Tooltip Shape example.

Is this topic helpful?​​​​​​​