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

ColorListLegend.ImageList Property

Gets or sets the source of images to be displayed within a legend.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

[DefaultValue(null)]
public object ImageList { get; set; }

#Property Value

Type Default Description
Object null

An object which represents the source of the images that can be displayed within the map control.

#Example

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

View Example

    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