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

Represents a layout element in the Telerik document model, encapsulating properties and methods for rendering and manipulating document structures.

Definition

Namespace:Telerik.Windows.Documents.Layout

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public abstract class LayoutElement

Inheritance: objectLayoutElement

Derived Classes: LayoutBox

Constructors

C#
public LayoutElement(DocumentStructureCollection collection)
Parameters:collectionDocumentStructureCollection

Properties

Represents the alignment options for layout elements in Telerik's document model.

C#
public ContentAlignment Alignment { get; set; }

Gets or sets a value indicating whether the element size will be calculated automatically by the layout system. Value of false indicates that the element's size will not be changed when calculating the layout.

C#
public virtual bool AutoSize { get; }

Gets the RadBitVector64 structure that holds all the bit states of the object.

C#
protected DocumentElementStateBitVector BitState { get; }

Bypasses the layout policies for the specified layout element, allowing for custom arrangement and positioning.

C#
public bool BypassLayoutPolicies { get; set; }

Gets the collection of child layout elements contained within the current layout element.

C#
public ILinkedListCollection<LayoutElement> Children { get; }

Gets the bounding rectangle of the clipped control for the layout element.

C#
public virtual RectangleF ClippedControlBoundingRectangle { get; }

Represents the bounding rectangle of a control within the layout element.

C#
public virtual RectangleF ControlBoundingRectangle { get; }

Gets the desired size of the layout element.

C#
public SizeF DesiredSize { get; set; }

Gets a value indicating whether the arrangement of the layout element is valid.

C#
public bool IsArrangeValid { get; }

Gets a value indicating whether the measurement process is currently in progress for the layout element.

C#
public bool IsMeasureInProgress { get; }

Gets a value indicating whether the measure of the layout element is valid.

C#
public bool IsMeasureValid { get; }

Gets a value indicating whether the current layout element is a top container.

C#
public virtual bool IsTopContainer { get; }
Property Value:

True if the current layout element is a top container; otherwise, false.

Gets or sets the offset of the layout element in the layout coordinate space.

C#
public PointF LayoutOffset { get; }

Gets the local bounding rectangle of the layout element, which represents the area occupied by the element in its local coordinate space.

C#
public RectangleF LocalBoundingRectangle { get; }
Property Value:

A rectangle structure that defines the local bounds of the layout element.

Measures the layout of the current element without notifying its parent.

C#
public bool MeasureWithoutParentNotification { get; set; }

Gets the parent layout element of the current layout element.

C#
public LayoutElement Parent { get; }
Property Value:

The parent layout element, or null if the current element has no parent.

Gets the rectangle that defines the area of the element before the last arrangement.

C#
public RectangleF PreviousArrangeRect { get; }

Gets or sets the size of the element which is the height and width of the visual rectangle that would contain the element. Size corresponds to element's Bounds.Size. When the AutoSize property is set to true setting the Size property to some value has no effect.

C#
public SizeF Size { get; set; }

Gets the total transformation matrix applied to the layout element. This transformation includes both the element's own transformations and any transformations applied by its parent elements.

C#
public RadMatrix TotalTransform { get; }

Applies a transformation to the layout element, modifying its properties accordingly.

C#
public RadMatrix Transform { get; }

Gets the level of this element in the LayoutElement tree it currently resides.

C#
public byte TreeLevel { get; protected set; }

Methods

Arranges the layout element within the specified rectangle.

C#
public void Arrange(RectangleF finalRect)
Parameters:finalRectRectangleF

The rectangle that defines the area in which the layout element should be arranged.

C#
protected virtual void ArrangeCore(RectangleF finalRect)
Parameters:finalRectRectangleF

Arranges the LayoutElement to its final location. The element must call the Arrange method of each of its children.

C#
protected virtual SizeF ArrangeOverride(SizeF finalSize)
Parameters:finalSizeSizeF

The size that is available for element.

Returns:

SizeF

The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.

Remarks:

In this method call to the Arrange method of each child must be made.

C#
protected virtual ILinkedListCollection<LayoutElement> CreateChildren()
Returns:

ILinkedListCollection<LayoutElement>

C#
protected virtual ILinkedListCollection<LayoutElement> CreateChildrenCollection(DocumentStructureCollection collection)
Parameters:collectionDocumentStructureCollectionReturns:

ILinkedListCollection<LayoutElement>

C#
protected void EnsureChildrenCreated()

Invalidates the arrangement of the layout element, forcing it to re-calculate its layout.

C#
public void InvalidateArrange()

Invalidates the current arrangement of the layout element, causing it to be re-measured and arranged on the next layout cycle.

C#
public void InvalidateArrange(bool recursive)
Parameters:recursivebool

A boolean value that determines whether the children of the layout element should also be invalidated.

Invalidates the current measure of the layout element, forcing a re-measure during the next layout pass.

C#
public virtual void InvalidateMeasure()

Invalidates the measurement of the layout element, forcing it to recalculate its size during the next layout pass.

C#
public void InvalidateMeasure(bool recursive)
Parameters:recursivebool

Indicates whether the parent layout element should also be invalidated.

Determines whether the element is currently in valid state. That is having a valid RadElementTree reference and being in either Constructed or Loaded state.

C#
protected bool IsInValidState(bool checkElementTree)
Parameters:checkElementTreeboolReturns:

bool

Measures the specified size of the layout element and returns the measured size.

C#
public void Measure(SizeF availableSize)
Parameters:availableSizeSizeF

The available size that the layout element should use for measuring.

C#
protected virtual SizeF MeasureCore(SizeF availableSize)
Parameters:availableSizeSizeFReturns:

SizeF

Measures the space required by the LayoutElement Used by the layout system.

C#
protected virtual SizeF MeasureOverride(SizeF availableSize)
Parameters:availableSizeSizeF

The size that is available to the LayoutElement. The available size can be infinity (to take the full size of the element)

Returns:

SizeF

The minimum size required by the element to be completely visible. Cannot be infinity.

Remarks:

In this method call to the Measure method of each child must be made.

Notifies the object for a change in its bit state.

C#
protected virtual void OnBitStateChanged(DocumentElementStates key, bool oldValue, bool newValue)
Parameters:keyDocumentElementStatesoldValueboolnewValuebool
C#
protected virtual void OnChildDesiredSizeChanged(LayoutElement child)
Parameters:childLayoutElement
C#
protected virtual void OnInvalidateArrange()
C#
protected virtual void OnInvalidateMeasure()
C#
protected virtual void OnParentChanged()
C#
protected virtual void OnParentChanging()

Applies the specified boolean value to the BitVector of the object.

C#
protected virtual void SetBitState(DocumentElementStates key, bool value)
Parameters:keyDocumentElementStatesvaluebool
C#
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)
Parameters:oldParentLayoutElementnewParentLayoutElement
C#
protected void SetParentCore(LayoutElement newParent)
Parameters:newParentLayoutElement
C#
protected virtual void ValidateParent(LayoutElement newParent)
Parameters:newParentLayoutElement

Events

C#
public event EventHandler ParentChanged
C#
public event EventHandler ParentChanging