ColorListLegend.CustomItems Property

Provides access to the collection of custom legend items.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.1.dll

Declaration

public MapLegendItemCollection CustomItems { get; }
Public ReadOnly Property CustomItems As MapLegendItemCollection

Property Value

Type Description
MapLegendItemCollection

A MapLegendItemCollection object.

Examples

This example shows how to customize color list map legend items. To do this, use the ColorListLegend.CustomItems collection.

    mapControl.Legends.Add(CreateLegend());
MapLegendBase CreateLegend() {
    ColorListLegend legend = new ColorListLegend() {
        ImageList = mapControl.ImageList,
        Alignment = LegendAlignment.TopRight
    };
    legend.CustomItems.Add(new ColorLegendItem() {
        ImageIndex = 0,
        Text = "Shipwreck Location"
    });
    return legend;
}
See Also