Sys.UI.Silverlight.Control.addEventListener Method

Called to add an event handler function that listens to an event on a Silverlight element.

Syntax

addEventListener: function(element, eventName, handler)

Usage

exampleControl.addEventListener(element, eventName, handler);

Parameter

Definition

element

The element that exposes the event.

eventName

A string representing the name of the event. This must be a valid event name for the type of element provided.

handler

The function to add as the event handler.

Return Value

A number indicating the Silverlight event listener token.

Remarks

The handler is removed automatically when the component is disposed.

This topic is ASP.NET Extensions documentation and is unsupported by Microsoft. Blank topics are included as placeholders and existing content is subject to change in future releases.