<Border x:Name="legendBorder" Background="#CC345BA9" Margin="0,60,8,0" Padding="4,0,4,4" CornerRadius="10" HorizontalAlignment="Right" VerticalAlignment="Top" d:LayoutOverrides="Height" BorderThickness="1" BorderBrush="Black" Visibility="Collapsed" > <Border.Effect> <DropShadowEffect/> </Border.Effect> <i:Interaction.Behaviors> <ei:MouseDragElementBehavior/> </i:Interaction.Behaviors> <StackPanel> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal"> <sdk:Label Content="Legend" FontWeight="Bold" FontSize="16" Margin="0,0,415,0" HorizontalAlignment="Left" Foreground="#FFF3FAFE"/> <Button x:Name="btnCloseLegend" Content="Button" Click="btnCloseLegend_Click" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,7,0" Style="{StaticResource ImageButton_Style}" Padding="0"/> </StackPanel> <Border BorderBrush="Black" BorderThickness="1" CornerRadius="10" Background="White" Padding="8"> <esri:Legend x:Name="legend" Map="{Binding ElementName=map1}" LayerItemsMode="Tree" ShowOnlyVisibleLayers="False" MinHeight="400" MaxHeight="400" MinWidth="506" MaxWidth="506" Refreshed="Legend_Refreshed"> <!-- Data template for map layers. Map layers can be services with sublayers or a layer within a service.--> <esri:Legend.MapLayerTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" > </CheckBox> <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" /> </StackPanel> </DataTemplate> </esri:Legend.MapLayerTemplate> <!-- Data template for sublayers within a map layer--> <esri:Legend.LayerTemplate> <DataTemplate> <CheckBox Content="{Binding Label}" IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" > </CheckBox> </DataTemplate> </esri:Legend.LayerTemplate> </esri:Legend> </Border> </StackPanel> </Border>
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.