I'am just coding some global gesture handlers for a wpf application. For example I am supposed to use right click as a trigger to proceed UI.
<Window.InputBindings>
<MouseBinding MouseAction="Ri开发者_如何学JAVAghtClick" Command="NavigationCommands.NextPage"/>
</Window.InputBindings>
But now the problem appears that <ListBox/>
consumes all mouse button events. I did some research but didn't found an easy way to make it just be unaware of the right button. Did anybody ever had this problem and found a solution? Thanks in advance.
You should be able to prevent the ListBox from consuming the mouse clicks using the following:
<ListBox>
<ListBox.InputBindings>
<MouseBinding MouseAction="RightClick" Command="ApplicationCommands.NotACommand" />
</ListBox.InputBindings>
</ListBox>
精彩评论