Skip to main content
A newer version of this page is available. .
All docs
V21.1

DrawMapSegmentableItemEventArgs.Segments Property

Contains the array of the Fill, Stroke, and StrokeWidth values for MapPath or MapPie segments.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v21.1.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Map

Declaration

public DrawMapSegmentEventArgs[] Segments { get; }

Property Value

Type Description
DrawMapSegmentEventArgs[]

The array of the Fill, Stroke, and StrokeWidth values for MapPath or MapPie segments.

Remarks

The following code sets the fill color of odd MapPie segments to red:

private void mapControl1_DrawMapItem(object sender, DrawMapItemEventArgs e) {  
  if(e.Item is MapPie) {  
    DrawMapSegmentableItemEventArgs args = (DrawMapSegmentableItemEventArgs)e;  
    for(int i = 1; i < args.Segments.Length; i += 2){  
      args.Segments[i].Fill = Color.Red;  
    }
  }  
}  
See Also