Class Mouse
Represents the mouse device. Contains several extensions to the Silverlight mouse capabilities.
Inheritance
Namespace: Telerik.Windows.Input
Assembly: Telerik.Windows.Controls.dll
Syntax
public static class Mouse : Object
Fields
MouseDownEvent
Occurs when the right mouse button is pressed.
Declaration
public static readonly RoutedEvent MouseDownEvent
Field Value
RoutedEvent
|
MouseUpEvent
Occurs when the right mouse button is released.
Declaration
public static readonly RoutedEvent MouseUpEvent
Field Value
RoutedEvent
|
MouseWheelEvent
Occurs when the mouse wheel is rotated.
Declaration
public static readonly RoutedEvent MouseWheelEvent
Field Value
RoutedEvent
|
Properties
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
System.TimeSpan
|
IsMouseWheelSupported
Gets a value indicating whether mouse wheel is supported.
Declaration
public static bool IsMouseWheelSupported { get; }
Property Value
System.Boolean
|
Methods
AddMouseDownHandler(UIElement, EventHandler<MouseButtonEventArgs>)
Adds a handler for the MouseDown attached event.
Declaration
public static void AddMouseDownHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler)
Parameters
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
The event handler. |
AddMouseDownHandler(UIElement, EventHandler<MouseButtonEventArgs>, Boolean)
Adds a handler for the MouseDown attached event.
Declaration
public static void AddMouseDownHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler, bool handledEventsToo)
Parameters
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
The event handler. |
System.Boolean
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
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
The event handler. |
AddMouseUpHandler(UIElement, EventHandler<MouseButtonEventArgs>, Boolean)
Adds a handler for the MouseUp attached event.
Declaration
public static void AddMouseUpHandler(UIElement element, EventHandler<MouseButtonEventArgs> handler, bool handledEventsToo)
Parameters
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
The event handler. |
System.Boolean
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
System.Windows.DependencyObject
element
The UIElement that listens to this event. |
System.EventHandler<MouseWheelEventArgs>
handler
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
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
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
System.Windows.UIElement
element
The UIElement that listens to this event. |
System.EventHandler<MouseButtonEventArgs>
handler
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
System.Windows.DependencyObject
element
The UIElement that listens to this event. |
System.EventHandler<MouseWheelEventArgs>
handler
The event handler. |