wpf-116899-controls-and-libraries-map-control-end-user-interaction-highlighting.md
The Map control supports map vector item highlighting.
This topic consists of the following sections.
To enable the highlighting functionality, set the VectorLayerBase.EnableHighlighting property to true.
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 = false |
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