I’m trying to disable double clicks on buttons and currently the only way I know is to handle the PreviewMouseDoubleClick and set the e.Handled = true.
Is there a way to do this in a button style? Or even better, disable double clicks application wide?
I would use an attached behavior (see this article). For example, say I create an attached behavior called DisableDoubleClickAttachedBehavior which handles the double click mouse event and sets e.Handled = true.
Then, you can nicely set the property via a style in XAML:
Or, you can override the style for all buttons (like you wanted):
I tested this and it seems to work nicely.