Skip to main content
A newer version of this page is available. .

Highlighting

  • 2 minutes to read

The Map control supports map vector item highlighting.

MapHighlighting

This topic consists of the following sections.

Enable Highlighting

To enable the highlighting functionality, set the VectorLayerBase.EnableHighlighting property to true.

EnableHighlighting

When you need to display the highlighted item above other layer items, set the VectorLayerBase.IncreaseItemZIndexInInteraction property to true.

The following images represent this property in action.

The property value The resulting image
IncreaseItemZIndexInInteraction = true IncreaseItemZIndexInInteraction_True
IncreaseItemZIndexInInteraction = false IncreaseItemZIndexInInteraction_False

Customize the Highlighted Item Appearance

To configure the highlight appearance of an individual map item, use the following properties.

Use XAML below to add a MapEllipse object with defined highlighting settings to a VectorLayer.

<dxm:VectorLayer>
      <dxm:MapItemStorage>
            <dxm:MapEllipse Location="70, -33" 
                     Width="3500" Height="3500" 
                     Fill="AliceBlue" 
                     HighlightFill="Red" 
                     HighlightStroke="Black">
                     <dxm:MapEllipse.HighlightStrokeStyle>
                             <dxm:StrokeStyle DashArray="10 1 5" 
                                     Thickness="5" 
                                     DashCap="Round"/>
                             </dxm:MapEllipse.HighlightStrokeStyle>
            </dxm:MapEllipse>
      </dxm:MapItemStorage>
</dxm:VectorLayer>

If you need to define the highlight appearance of all vector layer items, use the following properties.

Use the XAML below to set the common appearance settings to all vector layer items while they are highlighted.

<dxm:VectorLayer 
      HighlightShapeFill="Coral" 
      HighlightShapeStroke="Black">
      <dxm:VectorLayer.HighlightShapeStrokeStyle>
            <dxm:StrokeStyle DashArray="1 3" 
                 Thickness="2" 
                 DashCap="Round"/>
      </dxm:VectorLayer.HighlightShapeStrokeStyle>
      <!--…-->
</dxm:VectorLayer>
See Also