Skip to main content

NamedAttributeProviderBase.AttributeName Property

Gets or sets the name of an attribute whose value is provided.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

[DefaultValue("")]
public string AttributeName { get; set; }

Property Value

Type Default Description
String String.Empty

A String value.

Example

// Creates a key color colorizer.
private MapColorizer CreateColorizer() {
    KeyColorColorizer colorizer = new KeyColorColorizer() {
        ItemKeyProvider = new AttributeItemKeyProvider() { AttributeName = "CATEGORY" },
        PredefinedColorSchema = PredefinedColorSchema.Palette
    };

    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 1, Name = "Restaurant" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 2, Name = "Business room" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 3, Name = "Bathroom" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 4, Name = "Living room" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 5, Name = "Other" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 6, Name = "Service room" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 7, Name = "Pool" });
    colorizer.Keys.Add(new ColorizerKeyItem() { Key = 8, Name = "Gym" });

    return colorizer;
}
See Also