Show / Hide Table of Contents

Class MouseEventArgs

Provides event data for pointer message events related to specific user interface elements, such as PointerPressed.

Inheritance
System.Object
System.EventArgs
RoutedEventArgs
MouseEventArgs
MouseButtonEventArgs
MouseWheelEventArgs
RightTappedRoutedEventArgs
TappedRoutedEventArgs
Inherited Members
RoutedEventArgs.OriginalSource
System.EventArgs.Empty
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Input
Assembly: OpenSilver.dll
Syntax
public class MouseEventArgs : RoutedEventArgs

Properties

| Improve this Doc View Source

ClickCount

Gets the number of times the button was clicked.

Declaration
public int ClickCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Delta

Declaration
[NotImplemented]
public int Delta { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Handled

Gets or sets a value that marks the routed event as handled, and prevents most handlers along the event route from handling the same event again.

Declaration
public bool Handled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

KeyModifiers

Gets a value that indicates which key modifiers were active at the time that the pointer event was initiated.

Declaration
public ModifierKeys KeyModifiers { get; }
Property Value
Type Description
ModifierKeys
| Improve this Doc View Source

Pointer

Gets a reference to a pointer token.

Declaration
public Pointer Pointer { get; }
Property Value
Type Description
Pointer
| Improve this Doc View Source

StylusDevice

Gets an object that reports stylus device information, such as the collection of stylus points associated with the input.

Declaration
public StylusDevice StylusDevice { get; }
Property Value
Type Description
StylusDevice

The stylus device information object.

Methods

| Improve this Doc View Source

GetPosition(UIElement)

Returns the pointer position for this event occurrence, optionally evaluated against a coordinate origin of a supplied UIElement.

Declaration
public Point GetPosition(UIElement relativeTo)
Parameters
Type Name Description
UIElement relativeTo

Any UIElement-derived object that is connected to the same object tree. To specify the object relative to the overall coordinate system, use a relativeTo value of null.

Returns
Type Description
Point

A PointerPoint value that represents the pointer point associated with this event. If null was passed as relativeTo, the coordinates are in the frame of reference of the overall window. If a non-null relativeTo was passed, the coordinates are relative to the object referenced by relativeTo.

| Improve this Doc View Source

SetPointerAbsolutePosition(Object, Window)

Declaration
protected void SetPointerAbsolutePosition(object jsEventArg, Window window)
Parameters
Type Name Description
System.Object jsEventArg
Window window

Extension Methods

MouseEventArgsExtensions.GetSafePosition(MouseEventArgs, UIElement)
  • Improve this Doc
  • View Source