Export (0) Print
Expand All

HtmlElement Class

Silverlight

Represents an HTML element in the Document Object Model (DOM) of a Web page.

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

public sealed class HtmlElement : HtmlObject

The HtmlElement type exposes the following members.

  NameDescription
Public propertyChildrenGets a read-only collection of HTML elements that are immediate descendants of the current HTML element.
Public propertyCssClassGets or sets the cascading style sheet (CSS) class string for the current HTML element.
Public propertyDispatcherGets an instance of the dispatcher. (Inherited from ScriptObject.)
Public propertyIdGets the identifier of the current HTML element.
Public propertyManagedObjectGets the underlying managed object reference of the ScriptObject. (Inherited from ScriptObject.)
Public propertyParentGets a reference to the parent of the current HTML element.
Public propertyTagNameGets the HTML tag name of the current HTML element.
Top

  NameDescription
Public methodAppendChild(HtmlElement)Adds an element to the end of the child collection for the current HTML element.
Public methodAppendChild(HtmlElement, HtmlElement)Adds an element at a specified location in the child element collection for the current HTML element.
Public methodAttachEvent(String, EventHandler)Attaches the specified .NET Framework event handler (EventHandler) to the specified event on the current Document Object Model (DOM) object. (Inherited from HtmlObject.)
Public methodAttachEvent(String, EventHandler<HtmlEventArgs>)Attaches the specified .NET Framework event handler (EventHandler<TEventArgs>) to the specified event on the current Document Object Model (DOM) object. (Inherited from HtmlObject.)
Public methodCheckAccessDetermines whether the current thread is the browser's UI thread. (Inherited from ScriptObject.)
Protected methodConvertTo(Type, Boolean)Converts the current object to a specified type. This method is not supported. (Inherited from HtmlObject.)
Public methodConvertTo<T>()Converts the current scriptable object to a specified type. (Inherited from ScriptObject.)
Public methodDetachEvent(String, EventHandler)Detaches the specified.NET Framework event handler (EventHandler) from the specified event on the current Document Object Model (DOM) object. (Inherited from HtmlObject.)
Public methodDetachEvent(String, EventHandler<HtmlEventArgs>)Detaches the specified .NET Framework event handler (EventHandler<TEventArgs>) from the specified event on the current Document Object Model (DOM) object. (Inherited from HtmlObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeFrees resources and performs other cleanup operations before the scriptable object is reclaimed by garbage collection. (Inherited from ScriptObject.)
Public methodFocusSets the browser focus to the current HTML element.
Public methodGetAttributeGets the value of the specified attribute on the current HTML element.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetProperty(Int32)Gets the value of a property that is identified by ordinal number on the current scriptable object. (Inherited from ScriptObject.)
Public methodGetProperty(String)Gets the value of a property that is identified by name on the current scriptable object. (Inherited from ScriptObject.)
Public methodGetStyleAttributeRetrieves the specified style attribute for the current HTML element.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInitializeInfrastructure. Initializes a scriptable object. (Inherited from ScriptObject.)
Public methodInvokeInvokes a method on the current scriptable object, and optionally passes in one or more method parameters. (Inherited from ScriptObject.)
Public methodInvokeSelfInvokes the current ScriptObject and assumes that it represents a JavaScript method. (Inherited from ScriptObject.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveAttributeRemoves an attribute from the current HTML element.
Public methodRemoveChildRemoves the specified element from the child element collection of the current HTML element.
Public methodRemoveStyleAttributeRemoves a style attribute on the current HTML element.
Public methodSetAttributeSets the value of an attribute on the current HTML element.
Public methodSetProperty(Int32, Object)Sets the value of a property that is identified by ordinal number on the current scriptable object. (Inherited from ScriptObject.)
Public methodSetProperty(String, Object)Sets a property that is identified by name on the current scriptable object. (Inherited from ScriptObject.)
Public methodSetStyleAttributeSets the value of a style attribute on the current HTML element.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIDynamicMetaObjectProvider.GetMetaObjectReturns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from ScriptObject.)
Top

In the documentation for this class, "current HTML element" refers to the HTML element that is represented by the HtmlElement object.

Silverlight

Supported in: 5, 4, 3

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft