New to Telerik UI for WPFStart a free 30-day trial

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

Definition

Namespace:Telerik.Windows.Documents.Layout

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

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

Inheritance: objectLayoutElementCollectionBaseLayoutElementCollection

Implements: ICollection<LayoutBox>ICollection<LayoutElement>IEnumerableIEnumerable<LayoutBox>IEnumerable<LayoutElement>ILinkedListCollection<LayoutElement>...

Inherited Members LayoutElementCollectionBase.boxesCollectionLayoutElementCollectionBase.parentLayoutBoxLayoutElementCollectionBase.CheckForLeafLayoutBoxCollection()

Constructors

C#
public LayoutElementCollection(DocumentStructureCollection boxesCollection, LayoutElement parentLayoutBox)
Parameters:boxesCollectionDocumentStructureCollectionparentLayoutBoxLayoutElement

Properties

Gets the number of elements in the collection.

C#
public int Count { get; }
Property Value:

The number of elements in the LayoutElementCollection.

Implements: ICollection<LayoutBox>.Count

Retrieves the first element from the collection of layout elements.

C#
public LayoutBox First { get; }

Indicates whether the layout element has any child elements.

C#
public bool HasChildren { get; }

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

C#
public bool IsReadOnly { get; }
Property Value:

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

Implements: ICollection<LayoutBox>.IsReadOnly

Gets the last element in the layout element collection.

C#
public LayoutBox Last { get; }

Methods

Adds a LayoutBox to the LayoutElementCollection.

C#
public void Add(LayoutBox item)
Parameters:itemLayoutBox

The LayoutBox to add to the collection.

Implements: ICollection<LayoutBox>.Add(LayoutBox)

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

C#
public void AddLeafChildBox(LayoutBox currentLayoutBox, LayoutBox newLayoutBox)
Parameters:currentLayoutBoxLayoutBox

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

newLayoutBoxLayoutBox

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

Removes all elements from the LayoutElementCollection.

C#
public void Clear()

Implements: ICollection<LayoutBox>.Clear()

Remarks:

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

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

C#
public bool Contains(LayoutBox item)
Parameters:itemLayoutBox

The layout box to locate in the collection.

Returns:

bool

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

Implements: ICollection<LayoutBox>.Contains(LayoutBox)

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

C#
public void CopyTo(LayoutBox[] array, int arrayIndex)
Parameters:arrayLayoutBox[]

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

arrayIndexint

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

Implements: ICollection<LayoutBox>.CopyTo(LayoutBox[], int)

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

C#
public IEnumerator<LayoutBox> GetEnumerator()
Returns:

IEnumerator<LayoutBox>

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

Implements: IEnumerable<LayoutBox>.GetEnumerator()

Removes a specified LayoutBox from the LayoutElementCollection.

C#
public bool Remove(LayoutBox item)
Parameters:itemLayoutBox

The LayoutBox to be removed from the collection.

Returns:

bool

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

Implements: ICollection<LayoutBox>.Remove(LayoutBox)

Removes the last element from the collection of layout elements.

C#
public void RemoveLast()