Tuning WPF OnClick Buttons

I am looking for tunneling Button.Click. The ButtonBase.Click event is fired, and so the root object can only handle the event after the action that has been registered for this button has already occurred (too late for what I need).

I need the โ€œpreviewโ€ counter event so that I can handle the event before , the event registered to the button.
I am not sure that such an event exists, so if it is not, I would be happy to hear some workarounds.

+3
source share
1 answer

There is no event Button.PreviewClick. You can try using Button.PreviewMouseDownor Button.PreviewMouseUpto find out if this will work for what you are trying to do.

+4
source

Source: https://habr.com/ru/post/1714494/


All Articles