I am the one who got mixed-up. The visible and checked properties are the same. I have got back to a simple form
of esri legend. Still, when I display my map package in ArcMap, I have half of the layer selected. In my ArcGis Runtime map
I always have all the layers selected even if the Property="ShowOnlyVisibleLayers" Value="True"
<Style TargetType="esri:Legend">
<Setter Property="LayerItemsMode" Value="Tree" />
<Setter Property="ShowOnlyVisibleLayers" Value="True" />
<Setter Property="MapLayerTemplate" >
<Setter.Value>
<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>
</Setter.Value>
</Setter>
<Setter Property="LayerTemplate">
<Setter.Value>
<DataTemplate>
<CheckBox Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" >
</CheckBox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>