Interface IHTMLElementsCollection
Interface which is responsible for the collection of HTML elements.
Inherited Members
Namespace: Syncfusion.Windows.Forms.HTMLUI
Assembly: Syncfusion.HTMLUI.Windows.dll
Syntax
public interface IHTMLElementsCollection : IList, IHTMLCollection, ICollection, IEnumerable
Properties
Item[Int32]
Gets or sets the element with the specified index.
Declaration
IHTMLElement this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | index value |
Property Value
| Type |
|---|
| IHTMLElement |
Item[String]
Returns the child element with the specified unique ID if such element exists; NULL otherwise.
Declaration
IHTMLElement this[string uniqueID] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | uniqueID | An unique string value |
Property Value
| Type |
|---|
| IHTMLElement |
Methods
Add(IHTMLElement)
Adds an element to the collection.
Declaration
int Add(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for adding to the collection. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Index in the collection. |
Add(String)
Creates an element from it's string representation and adds it to the collection.
Declaration
int Add(string outerHtml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | outerHtml | String representation of the element. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Index of the element in the collection if created; -1 otherwise. |
AddRange(IHTMLElement[])
Adds a range of elements to the collection.
Declaration
void AddRange(IHTMLElement[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement[] | values | Array of elements for adding to the collection. |
Contains(IHTMLElement)
Indicates whether such element already exists in the collection.
Declaration
bool Contains(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | TRUE if element exists in the collection. |
GetElementByID(String)
Returns an array of elements with the specified user ID.
Declaration
IHTMLElement GetElementByID(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | ID of the element defined in the HTML document. |
Returns
| Type | Description |
|---|---|
| IHTMLElement | Element object by ID. |
GetElementByUniqueID(String)
Returns an array of elements with the specified unique ID.
Declaration
IHTMLElement GetElementByUniqueID(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Unique ID of the element. |
Returns
| Type | Description |
|---|---|
| IHTMLElement | Element by its unique ID. |
GetElementsByName(String)
Overloaded. Returns an array of elementswith the specified name.
Declaration
IHTMLElement[] GetElementsByName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the element. |
Returns
| Type | Description |
|---|---|
| IHTMLElement[] | Array of elements. |
GetElementsByName(String[])
Returns an array of elements with the specified names.
Declaration
IHTMLElement[] GetElementsByName(string[] names)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | names | Array of names. |
Returns
| Type | Description |
|---|---|
| IHTMLElement[] | Array of elements by names. |
IndexOf(IHTMLElement)
Returns the index of the specified element in the collection.
Declaration
int IndexOf(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element object. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Index of the element in the collection. |
Insert(Int32, IHTMLElement)
Overloaded. Inserts the specified element into the collection in the specified index.
Declaration
void Insert(int index, IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Index of the element. |
| IHTMLElement | element | Element for adding to the collection. |
Insert(Int32, String)
Creates the element from it's string representation and inserts it into the specified index.
Declaration
void Insert(int index, string outerHtml)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Index where the element must be placed. |
| System.String | outerHtml | String representation of the element. |
Remove(IHTMLElement)
Removes the specified element from the collection.
Declaration
void Remove(IHTMLElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IHTMLElement | element | Element for removing from the collection. |