ClassLayoutElementCollection
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:
public class LayoutElementCollection : LayoutElementCollectionBase, ILinkedListCollection<LayoutElement>, ICollection<LayoutElement>, IEnumerable<LayoutElement>, ICollection<LayoutBox>, IEnumerable<LayoutBox>, IEnumerable
Inheritance: objectLayoutElementCollectionBaseLayoutElementCollection
Implements:
Inherited Members
Constructors
LayoutElementCollection(DocumentStructureCollection, LayoutElement)
Declaration
public LayoutElementCollection(DocumentStructureCollection boxesCollection, LayoutElement parentLayoutBox)
Parameters
boxesCollection
parentLayoutBox
Properties
Count
Gets the number of elements in the collection.
Declaration
public int Count { get; }
Property Value
The number of elements in the LayoutElementCollection.
Implements
First
Retrieves the first element from the collection of layout elements.
HasChildren
Indicates whether the layout element has any child elements.
IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Returns true if the collection is read-only; otherwise, false.
Implements
Methods
Add(LayoutBox)
Adds a LayoutBox to the LayoutElementCollection.
Declaration
public void Add(LayoutBox item)
Parameters
item
The LayoutBox to add to the collection.
Implements
AddLeafChildBox(LayoutBox, LayoutBox)
Adds a leaf child box to the specified parent box in the layout element collection.
Clear()
Removes all elements from the LayoutElementCollection.
Declaration
public void Clear()
Implements
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.
CopyTo(LayoutBox[], int)
Copies the elements of the current LayoutElementCollection to the specified array, starting at the specified index in the array.
GetEnumerator()
Retrieves an enumerator that allows iteration through the collection of layout elements.
Declaration
public IEnumerator<LayoutBox> GetEnumerator()
Returns
An enumerator for the LayoutBox that can be used to iterate through the collection.
Implements
Remove(LayoutBox)
Removes a specified LayoutBox from the LayoutElementCollection.
RemoveLast()
Removes the last element from the collection of layout elements.
Declaration
public void RemoveLast()