N
N
Nikita072020-07-29 14:19:57
WPF
Nikita07, 2020-07-29 14:19:57

How to block the execution of an action in WPF?

Good afternoon, the essence of the question is as follows, there is a small WPF program, it has only one button, which has 3 events, the right mouse button, the left mouse button and the wheel press.
The essence of the question: "How to make it so that if the RMB is pressed, then it can only be canceled with the wheel, BUT NOT the LMB, and vice versa, if the LMB is pressed, then it can only be canceled by pressing the wheel, BUT NOT the RMB?"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2020-07-29
@Nikita07

as you want, and cut it out .. even though the state machine was washed
down, you have events, you file the handlers yourself. if you want a ready-made algorithm, then you need to clearly describe the conditions. you look while you paint, and it will become clearer yourself
ps but in general, tasks like do for me are not welcome here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question