我有ListBoxItem一个LeftClick手势:
<ListBoxItem x:Name="ListViewItemMenu" Content="{Binding Path=Header}" Padding="37 14" FontSize="15" Foreground="White">
<ListBoxItem.InputBindings>
<MouseBinding Gesture="LeftClick" Command="ApplicationCommands.New" />
</ListBoxItem.InputBindings>
</ListBoxItem>
但实际上它不是真正的点击,它只是一个MouseLeftButtonDown手势。Command无论按下后按钮是否抬起,都会执行。
MouseDown我想MouseUp在ListBoxItem. 反正有这样做吗?非常感激。
我也找不到将 a 添加Command到Expander. 上面显示的方法ListBoxItem不起作用。这里有什么魔法吗?谢谢!