MouseWheel

Occurs when the mouse wheel is moved while the mouse pointer is over a UI element.

<object MouseWheel="eventhandlerFunction" .../>
[token = ]object.AddEventListener("MouseWheel", eventhandlerFunction)

Arguments

AddEventListener Parameters

token

integer

A token that is returned from the function, which you can optionally retain as a variable. If you intend to call RemoveEventListener to remove the handler, you will need this token.

eventhandlerFunction

object

The name of your event handler function as it is defined in JavaScript. When used as an AddEventListener parameter, quotation marks around the function name are not required.

Event Handler Parameters

sender

object

The object that invoked the event.

mouseWheelEventArgs

object

MouseWheelEventArgs

mouseWheelEventArgs.Delta reports a number for the mouse wheel. Positive values are moves away from user, negative values are moves towards the user. (Silverlight 3)

mouseEventArgs.GetPosition(element).X identifies the x-coordinate position of the mouse.

mouseEventArgs.GetPosition(element).Y identifies the y-coordinate position of the mouse.

mouseEventArgs.Shift determines whether the SHIFT key is down.

mouseEventArgs.Ctrl determines whether the CTRL key is down.

mouseEventArgs.Source: Reports the object that raised the event.

Managed Equivalent

MouseWheel

Remarks

For more information, see the MouseWheel event.

Applies To

Border

Canvas

Ellipse

Glyphs

Image

InkPresenter

Line

MediaElement

PasswordBox (Silverlight 2)

Path

Polygon

Polyline

Popup (Silverlight 2)

Rectangle

StackPanel (Silverlight 2)

TextBlock

TextBox (Silverlight 2)

Version Information

Silverlight 3