我想ListBoxItem
在Style
. 这可能吗?
<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>