Class EventRouter
Routes pointer, mouse, scroll, and touch events through the view tree, performing hit testing, pointer capture, and enter/leave tracking.
public class EventRouter
- Inheritance
-
EventRouter
- Inherited Members
Constructors
EventRouter(View)
Initializes a new EventRouter rooted at the given view.
public EventRouter(View rootView)
Parameters
rootViewViewThe root of the view tree to route events through.
Methods
CapturePointer(View, int)
Captures all subsequent pointer events for the given pointer ID to view.
public void CapturePointer(View view, int pointerId)
Parameters
viewViewThe view that will exclusively receive events for this pointer.
pointerIdintThe pointer identifier to capture.
Dispatch(ref MouseDownEventRef)
Dispatches a mouse button down event as a pointer down event.
public void Dispatch(ref MouseDownEventRef e)
Parameters
Dispatch(ref MouseMoveEventRef)
Dispatches a mouse move event as a pointer move event.
public void Dispatch(ref MouseMoveEventRef e)
Parameters
Dispatch(ref MouseUpEventRef)
Dispatches a mouse button up event as a pointer up event.
public void Dispatch(ref MouseUpEventRef e)
Parameters
Dispatch(ref ScrollWheelEventRef, Point)
Dispatches a scroll wheel event to the deepest view under position
that handles it, bubbling up until Handled is set.
public void Dispatch(ref ScrollWheelEventRef e, Point position)
Parameters
eScrollWheelEventRefpositionPoint
Dispatch(ref TouchEventRef)
Dispatches a touch event, translating each touch point into a pointer event.
public void Dispatch(ref TouchEventRef touchEvent)
Parameters
touchEventTouchEventRef
ReleasePointer(View, int)
Releases pointer capture previously set by CapturePointer(View, int).
public void ReleasePointer(View view, int pointerId)