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 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 LayoutElementCollection

Represents a collection of layout elements used in Telerik's document layout system.

Inheritance
System.Object
LayoutElementCollectionBase
LayoutElementCollection
Inherited Members
LayoutElementCollectionBase.boxesCollection
LayoutElementCollectionBase.parentLayoutBox
LayoutElementCollectionBase.CheckForLeafLayoutBoxCollection()
Namespace: Telerik.Windows.Documents.Layout
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public class LayoutElementCollection : LayoutElementCollectionBase, ILinkedListCollection<LayoutElement>, ICollection<LayoutElement>, IEnumerable<LayoutElement>, ICollection<LayoutBox>, IEnumerable<LayoutBox>, IEnumerable

Constructors

LayoutElementCollection(DocumentStructureCollection, LayoutElement)

Declaration
public LayoutElementCollection(DocumentStructureCollection boxesCollection, LayoutElement parentLayoutBox)
Parameters
DocumentStructureCollection boxesCollection

LayoutElement parentLayoutBox

Properties

Count

Gets the number of elements in the collection.

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

The number of elements in the LayoutElementCollection.

First

Retrieves the first element from the collection of layout elements.

Declaration
public LayoutBox First { get; }
Property Value
LayoutBox

HasChildren

Indicates whether the layout element has any child elements.

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

IsReadOnly

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

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

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

Last

Gets the last element in the layout element collection.

Declaration
public LayoutBox Last { get; }
Property Value
LayoutBox

Methods

Add(LayoutBox)

Adds a LayoutBox to the LayoutElementCollection.

Declaration
public void Add(LayoutBox item)
Parameters
LayoutBox item

The LayoutBox to add to the collection.

AddLeafChildBox(LayoutBox, LayoutBox)

Adds a leaf child box to the specified parent box in the layout element collection.

Declaration
public void AddLeafChildBox(LayoutBox currentLayoutBox, LayoutBox newLayoutBox)
Parameters
LayoutBox currentLayoutBox

The parent layout box to which the child box will be added.

LayoutBox newLayoutBox

The child layout box that will be added to the parent box.

Clear()

Removes all elements from the LayoutElementCollection.

Declaration
public void Clear()
Remarks

This method clears the collection, effectively resetting it to an empty state.

Contains(LayoutBox)

Determines whether the specified layout box is contained within the collection.

Declaration
public bool Contains(LayoutBox item)
Parameters
LayoutBox item

The layout box to locate in the collection.

Returns
System.Boolean

true if the collection contains the specified layout box; otherwise, false.

CopyTo(LayoutBox[], Int32)

Copies the elements of the current LayoutElementCollection to the specified array, starting at the specified index in the array.

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

The array that is the destination of the elements copied from the collection.

System.Int32 arrayIndex

The zero-based index in the array at which storing the copied elements begins.

GetEnumerator()

Retrieves an enumerator that allows iteration through the collection of layout elements.

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

An enumerator for the LayoutBox that can be used to iterate through the collection.

Remove(LayoutBox)

Removes a specified LayoutBox from the LayoutElementCollection.

Declaration
public bool Remove(LayoutBox item)
Parameters
LayoutBox item

The LayoutBox to be removed from the collection.

Returns
System.Boolean

Returns true if the LayoutBox was successfully removed; otherwise, false.

RemoveLast()

Removes the last element from the collection of layout elements.

Declaration
public void RemoveLast()

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.