PredefinedColorsColorizer.PredefinedColorSchema Property
Gets or sets the predefined color schema for this colorizer.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
Declaration
[DefaultValue(PredefinedColorSchema.None)]
public PredefinedColorSchema PredefinedColorSchema { get; set; }
Property Value
Type | Default | Description |
---|---|---|
PredefinedColorSchema | None | A PredefinedColorSchema enumeration value. |
Available values:
Name | Description |
---|---|
None | Unspecified color schema. |
Palette | A map shape is painted using a color palette. |
Gradient | A map shape is painted using a color gradient. |
Criteria | A map shape is painted using a color according to the criteria. |
Example
char letter = 'A';
double defaultValue = 10;
MapPie pie;
private void Form1_Load(object sender, EventArgs e) {
MapItemStorage storage = new MapItemStorage();
pie = new MapPie() {
Location = new GeoPoint(51.507222, -0.1275),
Size = 100,
Argument = "pie",
};
pie.Segments.Add(new PieSegment() { Argument = NextLetter(), Value = defaultValue });
pie.Segments.Add(new PieSegment() { Argument = NextLetter(), Value = defaultValue });
pie.Segments.Add(new PieSegment() { Argument = NextLetter(), Value = defaultValue });
storage.Items.Add(pie);
mapControl1.Layers.Add(new VectorItemsLayer() {
Data = storage,
Colorizer = new KeyColorColorizer() {
ItemKeyProvider = new ArgumentItemKeyProvider(),
PredefinedColorSchema = PredefinedColorSchema.Palette
}
});
lbRotationDirection.DataSource = Enum.GetValues(typeof(RotationDirection));
lbSegments.DataSource = pie.Segments;
}
string NextLetter() {
return letter++.ToString();
}
See Also