UIInput represent any RoutedEvent intercepted from the registered Control. The reason to have another layer (instead of just Sender and EventArgs) is that, Touch and StylusEventArgs are InputEventArgs but not MouseEventArgs, which makes it difficult if each UIEventProcessor have to handle separated events.

public interface IUIInput
{
    RoutedEventArgs EventArgs { get; }
    object Sender { get;  }
    int ClickCount { get; set; }
    Point Position { get; }
    Point ScrollBarPosition { get; }
    Point PositionRelativeTo(IInputElement inputElement);
    UIInputType InputType { get; }
    UIInputState InputState { get; }
    bool IsDragging { get; set; }
    UIInputState Touch { get; set; }
    UITouchGesture TouchGesture { get; set; }
    ManipulationDelta Delta { get; set; }
}


UIInput is created using UIInputBase.FromEventArgs() method.

A list of currently available UIInput:
  • MouseInput - for MouseEventArgs and MouseButtonEventArgs
  • ManipulationInput - for ManipulationDeltaEventArgs
  • TouchInput - for TouchEventArgs
  • StylusInput - for StylusEventArgs
  • OtherInput - for anything else

Last edited Mar 7, 2014 at 8:22 AM by lycj, version 1

Comments

No comments yet.