ClassMouse
Represents the mouse device.
Definition
Namespace:Telerik.UI.Xaml.Controls
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public static class Mouse
Inheritance: objectMouse
Fields
MouseDownEvent
Occurs when the right mouse button is pressed.
Declaration
public static readonly RoutedEvent MouseDownEvent
Field Value
MouseUpEvent
Occurs when the right mouse button is released.
Declaration
public static readonly RoutedEvent MouseUpEvent
Field Value
MouseWheelEvent
Occurs when the mouse wheel is rotated.
Declaration
public static readonly RoutedEvent MouseWheelEvent
Field Value
Properties
ClickVicinity
A static property of type double that gets or sets the maximum distance a click point can move for the action to be considered a DoubleClick. The distance is measured in pixels. The default value is 5.
Declaration
public static double ClickVicinity { get; set; }
Property Value
DoubleClickDuration
Gets or sets the value determining the duration between two clicks that are considered as a double click.
Declaration
public static TimeSpan DoubleClickDuration { get; set; }
Property Value
Methods
AddMouseDownHandler(UIElement, EventHandler<MouseButtonEventArgs>)
Adds a handler for the MouseDown attached event.
Declaration
public static void AddMouseDownHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
AddMouseDownHandler(UIElement, EventHandler<MouseButtonEventArgs>, bool)
Adds a handler for the MouseDown attached event.
Declaration
public static void AddMouseDownHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler, bool handledEventsToo)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
handledEventsToo
True to register the handler such that it is invoked even when the routed event is marked handled in its event data; false to register the handler with the default condition that it will not be invoked if the routed event is already marked handled.
AddMouseUpHandler(UIElement, EventHandler<MouseButtonEventArgs>)
Adds a handler for the MouseUp attached event.
Declaration
public static void AddMouseUpHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
AddMouseUpHandler(UIElement, EventHandler<MouseButtonEventArgs>, bool)
Adds a handler for the MouseUp attached event.
Declaration
public static void AddMouseUpHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler, bool handledEventsToo)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
handledEventsToo
True to register the handler such that it is invoked even when the routed event is marked handled in its event data; false to register the handler with the default condition that it will not be invoked if the routed event is already marked handled.
AddMouseWheelHandler(DependencyObject, EventHandler<MouseWheelEventArgs>)
Adds a handler for the MouseWheel attached event.
Declaration
public static void AddMouseWheelHandler(DependencyObject element, EventHandler<MouseWheelEventArgs> handler)
Parameters
element
DependencyObject
The UIElement that listens to this event.
handler
EventHandler<MouseWheelEventArgs>
The event handler.
RemoveMouseDownHandler(UIElement, EventHandler<MouseButtonEventArgs>)
Removes a handler for the MouseDown attached event.
Declaration
public static void RemoveMouseDownHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
RemoveMouseUpHandler(UIElement, EventHandler<MouseButtonEventArgs>)
Removes a handler for the MouseUp attached event.
Declaration
public static void RemoveMouseUpHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler)
Parameters
element
UIElement
The UIElement that listens to this event.
handler
EventHandler<MouseButtonEventArgs>
The event handler.
RemoveMouseWheelHandler(DependencyObject, EventHandler<MouseWheelEventArgs>)
Removes a handler for the MouseWheel attached event.
Declaration
public static void RemoveMouseWheelHandler(DependencyObject element, EventHandler<MouseWheelEventArgs> handler)
Parameters
element
DependencyObject
The UIElement that listens to this event.
handler
EventHandler<MouseWheelEventArgs>
The event handler.