skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact 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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class SpecializedDocumentElementCollection<TInheritor>

Represents a collection of specialized document elements of type TInheritor.

Inheritance
System.Object
SpecializedDocumentElementCollection<TInheritor>
BlockCollection
InlineCollection
ParagraphCollection
SectionCollection
TableCellCollection
TableRowCollection
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public abstract class SpecializedDocumentElementCollection<TInheritor> : Object, ICollection<TInheritor>, IEnumerable<TInheritor>, IEnumerable, IList, ICollection where TInheritor : DocumentElement
Type Parameters
TInheritor

The type of the elements in the collection.

Properties

Count

Gets the number of elements contained in the collection.

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

First

Gets the first element in the collection of specialized document elements.

Declaration
public TInheritor First { get; }
Property Value
TInheritor

InnerCollection

Declaration
protected DocumentElementCollection InnerCollection { get; }
Property Value
DocumentElementCollection

IsReadOnly

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

Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean

Last

Gets the last element in the collection of specialized document elements.

Declaration
public TInheritor Last { get; }
Property Value
TInheritor

Methods

Add(TInheritor)

Adds a DocumentElement to the collection.

Declaration
public void Add(TInheritor item)
Parameters
TInheritor item

The object to add to the System.Collections.Generic.ICollection<>.

AddAfter(TInheritor, TInheritor)

Adds a new element of type TInheritor after a specified existing element in the collection.

Declaration
public void AddAfter(TInheritor item, TInheritor newItem)
Parameters
TInheritor item

The element after which the new element will be added.

TInheritor newItem

The new element to be added to the collection.

AddBefore(TInheritor, TInheritor)

Adds a new element before a specified existing element in the collection.

Declaration
public void AddBefore(TInheritor item, TInheritor newItem)
Parameters
TInheritor item

The new element to be added to the collection.

TInheritor newItem

The existing element before which the new element will be inserted.

AddRange(IEnumerable<TInheritor>)

Adds a collection of elements to the specialized document element collection.

Declaration
public void AddRange(IEnumerable<TInheritor> range)
Parameters
System.Collections.Generic.IEnumerable<TInheritor> range

The collection of elements to add to the collection.

Clear()

Clears all elements from the collection.

Declaration
public void Clear()
Remarks

This method removes all items from the current collection, resetting it to an empty state.

Contains(TInheritor)

Determines whether the collection contains a specific element.

Declaration
public bool Contains(TInheritor item)
Parameters
TInheritor item

The element to locate in the collection.

Returns
System.Boolean

true if the collection contains the element; otherwise, false.

CopyTo(TInheritor[], Int32)

Copies the elements of the collection to a specified array, starting at a particular index.

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

The one-dimensional array that is the destination of the elements copied from the collection. The array must have a zero-based index.

System.Int32 arrayIndex

The zero-based index in the destination array at which storing the copied elements will begin.

Detach(TInheritor)

Detaches the specified element from the collection.

Declaration
public bool Detach(TInheritor item)
Parameters
TInheritor item

The element to be detached from the collection.

Returns
System.Boolean

Returns the detached element.

GetEnumerator()

Returns an enumerator that iterates through the collection of specialized document elements.

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

A enumerator that provides iteration over the current collection of specialized document elements.

OnCollectionChanged()

Called when the collection is changed. Raises CollectionChanged event.

Declaration
protected virtual void OnCollectionChanged()

OnElementAdded(DocumentElement)

Called when DocumentElement is added.

Declaration
protected virtual void OnElementAdded(DocumentElement element)
Parameters
DocumentElement element

The element.

Remove(TInheritor)

Removes the specified element from the collection.

Declaration
public bool Remove(TInheritor item)
Parameters
TInheritor item

The element to be removed from the collection.

Returns
System.Boolean

True if the element was successfully removed; otherwise, false.

ToArray()

Converts the collection to an array.

Declaration
public TInheritor[] ToArray()
Returns
TInheritor[]

An array of DocumentElements.

VerifyChildrenOverride(TInheritor)

Declaration
protected virtual void VerifyChildrenOverride(TInheritor item)
Parameters
TInheritor item

Events

CollectionChanged

Occurs when the collection is changed.

Declaration
public event EventHandler CollectionChanged
Event Type
System.EventHandler

ElementAdded

Occurs when a DocumentElement is added.

Declaration
public event EventHandler<ElementAddedEventArgs> ElementAdded
Event Type
System.EventHandler<ElementAddedEventArgs>

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • 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.