InputPointerEventArgs Class
Provides event data for pointer-based input events.
public class InputPointerEventArgs : EventArgs
Constructors
InputPointerEventArgs(IInputElement, MouseEventArgs)
Initializes a new instance of the InputPointerEventArgs class.
public InputPointerEventArgs(IInputElement originalSource, MouseEventArgs e)
Parameter | Type | Description |
---|---|---|
originalSource | IInputElement | The original source element. |
e | MouseEventArgs | The wrapped event arguments. |
Properties
DeviceKind
Gets an InputDeviceKind that indicates the device kind.
public InputDeviceKind DeviceKind { get; }
Property Value
- InputDeviceKind:
An InputDeviceKind that indicates the device kind.
Handled
Gets or sets whether the event has been handled.
public bool Handled { get; set; }
Property Value
- bool:
true
if the event has been handled; otherwise,false
.
ModifierKeys
Gets the modifier keys that are currently pressed.
public ModifierKeys ModifierKeys { get; }
Property Value
- ModifierKeys:
The modifier keys that are currently pressed.
OriginalSource
Gets the original source of the event.
public IInputElement OriginalSource { get; }
Property Value
- IInputElement:
The original source of the event.
WrappedEventArgs
Gets the wrapped event arguments.
public MouseEventArgs WrappedEventArgs { get; }
Property Value
- MouseEventArgs:
The wrapped event arguments.
Methods
GetPosition(IUIElement)
Returns the current pointer position relative to the specified element.
public Point GetPosition(IUIElement relativeTo)
Parameter | Type | Description |
---|---|---|
relativeTo | IUIElement | The element to examine. |
Returns
- Point:
The current pointer position relative to the specified element.
IsPositionOver(IUIElement)
Returns whether the current pointer position is over the specified element.
public bool IsPositionOver(IUIElement element)
Parameter | Type | Description |
---|---|---|
element | IUIElement | The element to examine. |
Returns
- bool:
true
if the current pointer position is over the specified element; otherwise,false
.
ToString()
Returns a string representation of this instance.