Is there a way to set a mouse click or double-click handled in a WPF style so that double-clicking on the control with the style will never bubble?
i.e.
<Setter Property="MouseDoubleClickHandled" Value="True">
I was hoping there’s a way to do it without having to use a handler
As far I know, there is no “XAML” way to do it.
However, handler is not nice. It’s not reusable.
I would create myself an Attached behaviour
And hook up MouseButtonDown/MouseButtonDoubelClick event and use e.Handled=true. This way it will be reusable in different places.
You can also wrap your content into “Button” class. As far I know, Button class will mark your MouseClick&MouseDoubleClick events as handled automatically.
And you could also try to re-register specific event with RoutingStrategy.Direct <= okay this version does not work, as indicated here: Microsoft help forums