Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 1.54 KB

File metadata and controls

54 lines (43 loc) · 1.54 KB

Legend

Display a legend for a map or scene view.

Features

  • Binds to a GeoView.
  • Enables filtering out layers that are hidden because they are out of scale via the FilterByVisibleScaleRange property.
  • Enables filtering out hidden layers via the FilterHiddenLayers property.
  • Supports reversing the order of displayed layers via the ReverseLayerOrder property.

Usage

.NET MAUI:

<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
      ColumnDefinitions="*,300">
    <esri:MapView x:Name="MyMapView"/>
    <esri:Legend GeoView="{x:Reference MyMapView}"
                 Grid.Column="1" />
</Grid>

UWP/WinUI:

<Grid xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
      xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="300"/>
    </Grid.ColumnDefinitions>
    <esri:MapView x:Name="MyMapView"/>
    <toolkit:Legend GeoView="{x:Bind MyMapView}"
                    Grid.Column="1" />
</Grid>

WPF:

<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="300"/>
    </Grid.ColumnDefinitions>
    <esri:MapView x:Name="MyMapView"/>
    <esri:Legend GeoView="{Binding ElementName=MyMapView}"
                 Grid.Column="1" />
</Grid>