Controls in an empty window do not affect the first click

In order to click a control in a non-concentrated window, at least two clicks must be made. The window focuses on the first click, and then the control receives a MouseClick message on the second.

Question: is it possible to click a control in an unfocused window with the first click?

+4
source share
1 answer

How can I imagine this:

Subscribe to the MouseLeftButtonDown of the parent control or an external grid or something else, then use MouseButtonEventArgs, which have a Target property telling you who clicked right now.

Then do what clicked the item that you wanted to click on your own; -)

+1
source

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


All Articles