skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DocumentElementCollectionBase<T, TOwner>

Provides based functionality for collections of document elements.

Inheritance
System.Object
DocumentElementCollectionBase<T, TOwner>
DocumentElementCollection<T, TOwner>
DocumentElementCollection<T, TOwner>
Inherited Members
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: Telerik.Windows.Documents.Core.Data
Assembly: Telerik.Windows.Documents.Core.dll

Syntax

public abstract class DocumentElementCollectionBase<T, TOwner> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
T

The type of the document elements which should be added to the collection.

TOwner

The type of the owner of the collection.

Properties

Count

Gets the number of elements contained in the collection.

Declaration
public int Count { get; }
Property Value
System.Int32

The number of elements contained in the collection.

Implements
System.Collections.Generic.ICollection<T>.Count

Item[Int32]

Gets or sets the element at the specified index.

Declaration
public T this[int index] { get; set; }
Parameters
System.Int32 index

The index.

Property Value
T

Implements
System.Collections.Generic.IList<T>.Item[System.Int32]

Owner

Gets the element holding the collection.

Declaration
protected TOwner Owner { get; }
Property Value
TOwner

The owner element.

Methods

Add(T)

Adds an item to the collection.

Declaration
public void Add(T item)
Parameters
T item

The element to add to the collection.

Implements
System.Collections.Generic.ICollection<T>.Add(T)

Clear()

Removes all items from the collection.

Declaration
public void Clear()
Implements
System.Collections.Generic.ICollection<T>.Clear()

Contains(T)

Determines whether the collection contains a specific element.

Declaration
public bool Contains(T item)
Parameters
T item

The element to locate in the collection.

Returns
System.Boolean

true if item is found in the collection; otherwise, false.

Implements
System.Collections.Generic.ICollection<T>.Contains(T)

CopyTo(T[], Int32)

Copies the elements of the collection to an System.Array, starting at a particular System.Array index.

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
T[] array

The array.

System.Int32 arrayIndex

Index of the array.

Implements
System.Collections.Generic.ICollection<T>.CopyTo(T[], System.Int32)

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<T> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<T>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

IndexOf(T)

Determines the index of a specific element in the collection.

Declaration
public int IndexOf(T item)
Parameters
T item

The element to locate in the collection.

Returns
System.Int32

The index of item if found in the list; otherwise, -1.

Implements
System.Collections.Generic.IList<T>.IndexOf(T)

Insert(Int32, T)

Inserts an element to the collection at the specified index.

Declaration
public void Insert(int index, T item)
Parameters
System.Int32 index

The zero-based index at which item should be inserted.

T item

The element to insert into the collection.

Implements
System.Collections.Generic.IList<T>.Insert(System.Int32, T)

InsertRange(Int32, IEnumerable<T>)

Inserts an elements to the collection at the specified index.

Declaration
public void InsertRange(int index, IEnumerable<T> items)
Parameters
System.Int32 index

The zero-based index at which items should be inserted.

System.Collections.Generic.IEnumerable<T> items

The elements to be inserted into the collection.

OnAfterRemove(T)

Called when the element is removed.

Declaration
protected virtual void OnAfterRemove(T item)
Parameters
T item

The element.

Remove(T)

Removes the first occurrence of a specific object from the collection.

Declaration
public bool Remove(T item)
Parameters
T item

The object to remove from the collection.

Returns
System.Boolean

true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

Implements
System.Collections.Generic.ICollection<T>.Remove(T)

RemoveAt(Int32)

Removes the element at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
System.Int32 index

The zero-based index of the item to remove.

Implements
System.Collections.Generic.IList<T>.RemoveAt(System.Int32)

RemoveRange(Int32, Int32)

Removes the range.

Declaration
public void RemoveRange(int index, int count)
Parameters
System.Int32 index

The zero-based index of the item to remove.

System.Int32 count

The number of elements to remove.

SetParent(T, TOwner)

Sets the parent of the document element.

Declaration
protected abstract void SetParent(T item, TOwner parent)
Parameters
T item

The document element.

TOwner parent

The parent which should be set to the document element.

VerifyDocumentElementOnInsert(T)

Verifies the validity of the document element before it is inserted in the collection.

Declaration
protected abstract void VerifyDocumentElementOnInsert(T item)
Parameters
T item

The item.

Explicit Interface Implementations

ICollection<T>.IsReadOnly

Gets a value indicating whether the collection is read-only.

Declaration
bool ICollection<T>.IsReadOnly { get; }
Returns
System.Boolean

true if the collection is read-only; otherwise, false.

Implements
System.Collections.Generic.ICollection<T>.IsReadOnly

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Implements
System.Collections.IEnumerable.GetEnumerator()
Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.