I would like to have it availble for only certain feature classes not all of them.
You can initialize by code the tag property with the expected visibility for the opacity slider:
private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e)
{
e.LayerItem.Tag= IsOpacityNeeded(e.LayerItem.Layer) ? Visibility.Visible : Viisbility.Collapsed ;
}
Then you can retemplate the maplayeritem to use the Tag as slider visibility:
<Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" VerticalAlignment="Center"
Visibility="{Binding Tag}" />