Witam, Mam mały problem z kontrolką ListBox. Otóz w xaml'u mam następujący kod:
<ListBox>
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem>
<Label Content="{Binding}" >
<Label.InputBindings>
<MouseBinding MouseAction="LeftClick"
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=SelectedItem, Mode=TwoWay}"
CommandParameter="{Binding}" />
</Label.InputBindings>
</Label>
</ListBoxItem>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox>
Po uruchomieniu wszystko wyświetla się tak jak chciałem. Natomiast właściwość SelectedItem
oraz cały wiersz, ustawia się tylko gdy kliknę obok Labela
. Nie mogę jednak ustawić właściwości gdy kliknę bezpośrednio w ikonkę z tekstem. Jak to rozwiązać?