Here is how I do it:
<ListBox.ItemTemplate> <DataTemplate> ... <CheckBox VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="CheckBox1" IsChecked="True" Grid.Row="0"> <inf:BindingHelper.Binding> <inf:BindingProperties TargetProperty="Visibility" SourceProperty="IsSelected" Converter="{StaticResource VisibilityConverter}" RelativeSourceAncestorType="ListBoxItem" /> </inf:BindingHelper.Binding> </CheckBox> ... </DataTemplate> </ListBox.ItemTemplate>
You need to do a relative binding, which, unfortunately, is not in Silverlight ... BindingHelper is a helper class that overcomes this restriction (search for "relative binding in silverlight" to find it).
knom
source share