Unloaded (FrameworkElement)

Silverlight

Occurs when this object is no longer connected to the main object tree.

<object Unloaded="eventhandlerFunction"  .../>
[token = ]object.AddEventListener("Unloaded", 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 script. When used as an AddEventListener parameter, quotation marks around the function name are not required. (See the "Remarks" section.)

Event Handler Parameters

sender

object

The object that invoked the event.

eventArgs

object

This parameter is always set to null.

Unloaded is not raised for any object if the Silverlight application shuts down for any reason. This includes cases where the browser host application is closed by the user. An example case that would raise Unloaded is if you clear the Children collection of the root visual that contained the object.

Border (Silverlight 2)

Canvas

Ellipse

Glyphs

Image

InkPresenter

Line

MediaElement

MultiScaleImage (Silverlight 2)

PasswordBox (Silverlight 2)

Path

Polygon

Polyline

Popup (Silverlight 2)

Rectangle

StackPanel (Silverlight 2)

TextBlock

TextBox (Silverlight 2)

Community Additions

ADD
Show: