This interface is used by MouseControllerDispatcher to support interaction with UIElements that grab mouse capture. When a mouse was pressed and a control grabs the mouse capture the MouseControllerDispatcher creates a capture context to allow the mouse to interact with the UIElement while inside the context but also to switch back to another context when the user drags the mouse out of the UIElement.
An example scenerio is selection of cells inside a grid. While inside a textbox you can select text but when dragging the mouse outside the grid switches to selecting cells. When dragging the mouse back inside the textbox, the textbox gets the mouse capture again and you switch back to selecting text inside the cell.
public interface ICaptureContext
Cancel the mouse capture.
true if capture can be cancelled; false if context should not be changed.
Determines if the points belongs to the same element that this context was crreated for.
bool PointInContext(Point mousePosition)
The mouse position.
Recaptures the mouse if the capture was taken away earlier because the user moved the mouse away from the UIElement and now has moved the mouse back into the UIElement.