Question

I will define an event for my border element that relize mouse left button up outside of this element.

Was it helpful?

Solution

You can get mouse up event outside the element who received mouse down, if on the mouse down you call element.CaptureMouse() (and on mouse up, do not forget to call element.ReleaseMouseCapture()).

OTHER TIPS

        Mouse.Capture (this,CaptureMode.SubTree);
        AddHandler ();

    private void AddHandler()
    {
        AddHandler (Mouse.PreviewMouseDownOutsideCapturedElementEvent,new MouseButtonEventHandler (HandleClickOutsideOfControl),true);
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top