How can i bind a command parameter to self?
I try like this:
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Button Content="G"
Background="Green"
Foreground="White"
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}},
Path=DataContext.LabelGoodCommand}"
CommandParameter="{Binding /}"
Width="20" Height="20" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
But this doesn't work. In viewmodel listbox items binding to ObservableCollection.