I have a winforms application which hosts a wpf control. At some point wpf control captures the mouse. I want to release it when the mouse is clicked outside the control. I am aware that I can subscribe to PreviewMouseDownOutsideCapturedElement
event or subscribe to PreviewMouseDown
and perform a hit test. And then release mouse capture in the event handler.
What I do not know, is how can I let the mouse click go through after I release the mouse? For example, if I click on winforms button when the mouse is captured by wpf control, I want to do both - release mouse and click the button. Because right now I have to perform a double click to press a button: first click cancels capture, and the second one presses the button. I would like to know if there is a way avoid it.