A newer version of this page is available. Switch to the current version.

DrawMapItemEventArgs.IsSelected Property

Gets a value that indicates whether a map item is selected.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v19.2.dll


public bool IsSelected { get; }
Public ReadOnly Property IsSelected As Boolean

Property Value

Type Description

true, if a map item is selected; otherwise, false.


Use the IsSelected property to determine whether a map item is selected when handling the MapControl.DrawMapItem event.


This example illustrates how to customize vector items when they are drawn on a map.

To do this, it's necessary to handle the MapControl.DrawMapItem event and provide new values for the event arguments object.

using DevExpress.XtraMap;

namespace DrawMapItemExample {

    public class MapItemFactory : DefaultMapItemFactory {

        protected override void InitializeItem(MapItem item, object obj) {
            base.InitializeItem(item, obj);
            MapRectangle rect = item as MapRectangle;
            if(rect != null) {
                rect.Width = 1000;
                rect.Height = 1000;
See Also