Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DrawMapSegmentEventArgs.Fill Property

Gets or sets the color that fills a map segment.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public Color Fill { get; set; }

#Property Value

Type Description
Color

The color that fills a map segment.

#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