WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class HTMLElementsCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class HTMLElementsCollection

    Implementation of IHTMLElementCollection interface.

    Inheritance
    System.Object
    System.Collections.CollectionBase
    EventBaseCollection
    HTMLElementsCollection
    Implements
    IHTMLElementsCollection
    System.Collections.IList
    IHTMLCollection
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    EventBaseCollection.OnClear()
    EventBaseCollection.OnClearComplete()
    EventBaseCollection.OnInsert(Int32, Object)
    EventBaseCollection.OnInsertComplete(Int32, Object)
    EventBaseCollection.OnRemove(Int32, Object)
    EventBaseCollection.OnRemoveComplete(Int32, Object)
    EventBaseCollection.OnSet(Int32, Object, Object)
    EventBaseCollection.OnSetComplete(Int32, Object, Object)
    EventBaseCollection.RaiseOnChangedEvent()
    EventBaseCollection.QuietMode
    EventBaseCollection.OnChanged
    EventBaseCollection.Clearing
    EventBaseCollection.Cleared
    EventBaseCollection.Inserting
    EventBaseCollection.Inserted
    EventBaseCollection.Removing
    EventBaseCollection.Removed
    EventBaseCollection.Setting
    EventBaseCollection.Set
    System.Collections.CollectionBase.RemoveAt(System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.CollectionBase.GetEnumerator()
    System.Collections.CollectionBase.OnValidate(System.Object)
    System.Collections.CollectionBase.InnerList
    System.Collections.CollectionBase.List
    System.Collections.CollectionBase.Capacity
    System.Collections.CollectionBase.Count
    System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
    System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
    System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
    System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
    System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.HTMLUI
    Assembly: Syncfusion.HTMLUI.Windows.dll
    Syntax
    public class HTMLElementsCollection : EventBaseCollection, IHTMLElementsCollection, IList, IHTMLCollection, ICollection, IEnumerable

    Constructors

    HTMLElementsCollection(IHTMLElement)

    Initializes a new instance of the HTMLElementsCollection class

    Declaration
    public HTMLElementsCollection(IHTMLElement parent)
    Parameters
    Type Name Description
    IHTMLElement parent

    Collection parent.

    Properties

    Item[Int32]

    Gets or sets the HTML element specified by its collection index.

    Declaration
    public IHTMLElement this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    an int value

    Property Value
    Type Description
    IHTMLElement

    Item[String]

    Returns the child element by its unique ID if such element exists; NULL otherwise.

    Declaration
    public IHTMLElement this[string uniqueID] { get; }
    Parameters
    Type Name Description
    System.String uniqueID

    a string id

    Property Value
    Type Description
    IHTMLElement

    Parent

    Gets the parent element of the current collection.

    Declaration
    public IHTMLElement Parent { get; }
    Property Value
    Type Description
    IHTMLElement

    Methods

    Add(IHTMLElement)

    Adds the specified element into the collection.

    Declaration
    public int Add(IHTMLElement element)
    Parameters
    Type Name Description
    IHTMLElement element

    Element to add into the collection.

    Returns
    Type Description
    System.Int32

    Index of the element added to the collection.

    Add(String)

    Creates an element from it's string representation and adds it to the collection.

    Declaration
    public 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 an array of elements into the collections.

    Declaration
    public void AddRange(IHTMLElement[] values)
    Parameters
    Type Name Description
    IHTMLElement[] values

    Array of elements.

    Clear()

    Overloaded. Clears and disposes the collection of child elements.

    Declaration
    public void Clear()

    Clear(Boolean)

    Clears the collection of child elements.

    Declaration
    public void Clear(bool bDispose)
    Parameters
    Type Name Description
    System.Boolean bDispose

    Indicates whether to dispose all children.

    Contains(IHTMLElement)

    Indicates whether collection contains the specified element.

    Declaration
    public bool Contains(IHTMLElement element)
    Parameters
    Type Name Description
    IHTMLElement element

    Element to check.

    Returns
    Type Description
    System.Boolean

    True if item exists in collection; false otherwise.

    GetElementByID(String)

    Search method. Returns a reference on the element with the specified ID.

    Declaration
    public IHTMLElement GetElementByID(string id)
    Parameters
    Type Name Description
    System.String id

    Unique id of the element.

    Returns
    Type Description
    IHTMLElement

    NULL if nothing is found; element reference otherwise.

    GetElementByUniqueID(String)

    Search method. Returns a reference of the element with the specified unique ID.

    Declaration
    public IHTMLElement GetElementByUniqueID(string id)
    Parameters
    Type Name Description
    System.String id

    Unique id of the element.

    Returns
    Type Description
    IHTMLElement

    NULL if nothing is found; element reference otherwise.

    GetElementsByName(String)

    Overloaded. Returns an array of elements with the specified name.

    Declaration
    public IHTMLElement[] GetElementsByName(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the element for returning.

    Returns
    Type Description
    IHTMLElement[]

    Array of elements with such a name.

    GetElementsByName(String[])

    Returns an array of elements with name from the names array.

    Declaration
    public IHTMLElement[] GetElementsByName(string[] names)
    Parameters
    Type Name Description
    System.String[] names

    Array of names of the element for returning.

    Returns
    Type Description
    IHTMLElement[]

    Elements with such names.

    IndexOf(IHTMLElement)

    Returns the index of the element from the collection.

    Declaration
    public int IndexOf(IHTMLElement element)
    Parameters
    Type Name Description
    IHTMLElement element

    Element whose index is needed.

    Returns
    Type Description
    System.Int32

    Zero-based index of the item in the collection.

    Insert(Int32, IHTMLElement)

    Inserts the element into the specified position.

    Declaration
    public void Insert(int index, IHTMLElement element)
    Parameters
    Type Name Description
    System.Int32 index

    Place where element must be placed.

    IHTMLElement element

    Element to place.

    Insert(Int32, String)

    Creates an element from it's string representation and inserts it into the specified position.

    Declaration
    public void Insert(int index, string outerHtml)
    Parameters
    Type Name Description
    System.Int32 index

    Index where element must be placed.

    System.String outerHtml

    String representation of the element.

    Remove(IHTMLElement)

    Overloaded. Removes the specified element from the collection and disposes it.

    Declaration
    public void Remove(IHTMLElement element)
    Parameters
    Type Name Description
    IHTMLElement element

    Element to remove.

    Remove(IHTMLElement, Boolean)

    Removes the specified element from the collection.

    Declaration
    public void Remove(IHTMLElement element, bool bDispose)
    Parameters
    Type Name Description
    IHTMLElement element

    Element to be removed from the collection.

    System.Boolean bDispose

    Indicates whether to dispose the element.

    Implements

    IHTMLElementsCollection
    System.Collections.IList
    IHTMLCollection
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved