Condividi tramite


HtmlEventArgs.Source Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a reference to the Document Object Model (DOM) element or object that raised the event.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

Syntax

'Declaration
Public ReadOnly Property Source As HtmlObject
public HtmlObject Source { get; }

Property Value

Type: System.Windows.Browser.HtmlObject
A reference to the DOM element or object that raised the event.

Remarks

Based on the DOM type that originally raised the event, this property value can be cast to an HtmlDocument or an HtmlElement.

Only Firefox browsers can return a window reference (HtmlObject reference in managed code) in the Source property. Internet Explorer returns only element references (HtmlElement in managed code), and will always return nulla null reference (Nothing in Visual Basic) for events that are raised by the window or by document objects.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.