Skip to main content

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

KeyColorColorizer.Colors Property

Returns a collection of colors used by the KeyColorColorizer.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public ColorCollection Colors { get; }

#Property Value

Type Description
ColorCollection

A ColorCollection object that stores Color objects.

#Example

MapColorizer CreateColorizer() {
    KeyColorColorizer colorizer = new KeyColorColorizer() {
        ItemKeyProvider = new ArgumentItemKeyProvider()
    };

    colorizer.Colors.Add(Color.FromArgb(255, 207, 98));
    colorizer.Colors.Add(Color.FromArgb(169, 181, 188));
    colorizer.Colors.Add(Color.FromArgb(233, 152, 118));

    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 1, Name = "Gold" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 2, Name = "Silver" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 3, Name = "Bronze" });

    return colorizer;
}
See Also