<Style x:Key="ItemsControl" TargetType="esriToolkit:Legend"> <Setter Property="LayerItemsMode" Value="Flat" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="esriToolkit:Legend"> <ScrollViewer Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" > <ItemsControl ItemsSource="{TemplateBinding LayerItemsSource}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <!--Layer Item--> <ContentPresenter Content="{Binding}" ContentTemplate="{Binding Template}" /> <!--Legend Items--> <ItemsControl ItemsSource="{Binding LegendItems}" > <ItemsControl.ItemTemplate> <DataTemplate > <ContentPresenter Content="{Binding}" ContentTemplate="{Binding Template}" /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> <ItemsPresenter/> </ItemsControl> </ScrollViewer> </ControlTemplate> </Setter.Value> </Setter> </Style>
<esri:Legend.LegendItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Margin="0,-1"> <Image Source="{Binding ImageSource}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" Height="15" Width="15" Margin="0,-1" /> <TextBlock Text="{Binding Label}" Margin="5,0,0,0" VerticalAlignment="Center" /> </StackPanel> </DataTemplate> </esri:Legend.LegendItemTemplate>The side effect due to the uniform stretch is that all symbols will have the same size. This can be an issue if your feature layer rendering is playing with the size of the symbols.
I have ArcGIS 9.3.1 SP1.
What does it mean for a layer to be public or private? How can I check / alter that.