MouseWheel

Silverlight

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

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

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.

For more information, see the MouseWheel event.

Silverlight 3

Community Additions

ADD
Show: