Skip to main content

DrawMapItemEventArgs.Stroke Property

Gets or sets the Color that specifies how the map item outline is painted.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

public Color Stroke { get; set; }

Property Value

Type Description
Color

A Color value that specifies how the map item outline is painted.

Remarks

Use the Stroke property when implementing the MapControl.DrawMapItem event.

Example

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