Back to Devexpress

ColorListLegend.ImageList Property

windowsforms-devexpress-dot-xtramap-dot-colorlistlegend.md

latest2.2 KB
Original Source

ColorListLegend.ImageList Property

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

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue(null)]
public object ImageList { get; set; }
vb
<DefaultValue(Nothing)>
Public Property ImageList As Object

Property Value

TypeDefaultDescription
Objectnull

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

csharp
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;
}
vb
mapControl.Legends.Add(CreateLegend())
Private Function CreateLegend() As MapLegendBase
    Dim legend As New ColorListLegend() With {.ImageList = mapControl.ImageList, .Alignment = LegendAlignment.TopRight}
    legend.CustomItems.Add(New ColorLegendItem() With {.ImageIndex = 0, .Text = "Shipwreck Location"})
    Return legend
End Function

See Also

ColorListLegend Class

ColorListLegend Members

DevExpress.XtraMap Namespace