Quote:Original post by Headkaze
I didn't read any explaination or way around it.
Quote:
Whenever you want to not handle an event because of it's spurious origin, simply detect this case in the event handler and set e.Handled to true in the EventArgs.
See the previous posts in this thread.
Quote:Original post by ernow
The only solution I see is by subscribing to the SizeChanged event and checking there whether the form got maximized (WindowState). If so, set a bool and check for the bool in the mouseup, resetting it when it was set. That way you ignore the MouseUp from the resize.
So what he said was detect when the undesired behavior, as shown by ernow. And set e.Handled to true and return from your mouseup handler.
Quote:Original post by Headkaze
In his post before this he asks if it's "by design" and that it "can't be the desired behavior" and "is extremely problematic.".
Quote:
You're seeing this because double clicking the Window's title bar results in maximizing the window. So, while your double click is still "in progress", the canvas expands to be underneath the mouse cursor but the mouse button is still held down.
It seems very logical to me that the mouse up event fires, even if it is inconvient. A click has occured, which means the mouse button did go down. So it doesn't seem like a strench to expect a mouse up event to occur. In fact, if anything I'm more surprised by the lack of the mouse down event.