5
Vorrei aggiungere un clic destro e un comando clic sinistro a ogni ListBoxItem
in un Style
. È possibile?Definire InputBindings nello stile
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="InputBindings">
<Setter.Value>
<MouseBinding Command="{x:Static View:Commands.AddItem}"
MouseAction="LeftClick"/>
<MouseBinding Command="{x:Static View:Commands.RemoveItem}"
MouseAction="RightClick"/>
</Setter.Value>
</Setter>
</Style>