Class
LayoutElement

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:

cs-api-definition
public abstract class LayoutElement

Inheritance: objectLayoutElement

Derived Classes: LayoutBox

Constructors

LayoutElement(DocumentStructureCollection)

Declaration

cs-api-definition
public LayoutElement(DocumentStructureCollection collection)

Parameters

collection

DocumentStructureCollection

Properties

Alignment

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

Declaration

cs-api-definition
public ContentAlignment Alignment { get; set; }

Property Value

ContentAlignment

AutoSize

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.

Declaration

cs-api-definition
public virtual bool AutoSize { get; }

Property Value

bool

BitState

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

Declaration

cs-api-definition
protected DocumentElementStateBitVector BitState { get; }

Property Value

DocumentElementStateBitVector

BypassLayoutPolicies

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

Declaration

cs-api-definition
public bool BypassLayoutPolicies { get; set; }

Property Value

bool

Children

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

Declaration

cs-api-definition
public ILinkedListCollection<LayoutElement> Children { get; }

Property Value

ILinkedListCollection<LayoutElement>

ClippedControlBoundingRectangle

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

Declaration

cs-api-definition
public virtual RectangleF ClippedControlBoundingRectangle { get; }

Property Value

RectangleF

ControlBoundingRectangle

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

Declaration

cs-api-definition
public virtual RectangleF ControlBoundingRectangle { get; }

Property Value

RectangleF

DesiredSize

Gets the desired size of the layout element.

Declaration

cs-api-definition
public SizeF DesiredSize { get; set; }

Property Value

SizeF

IsArrangeValid

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

Declaration

cs-api-definition
public bool IsArrangeValid { get; }

Property Value

bool

IsMeasureInProgress

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

Declaration

cs-api-definition
public bool IsMeasureInProgress { get; }

Property Value

bool

IsMeasureValid

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

Declaration

cs-api-definition
public bool IsMeasureValid { get; }

Property Value

bool

IsTopContainer

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

Declaration

cs-api-definition
public virtual bool IsTopContainer { get; }

Property Value

bool

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

LayoutOffset

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

Declaration

cs-api-definition
public PointF LayoutOffset { get; }

Property Value

PointF

LocalBoundingRectangle

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

Declaration

cs-api-definition
public RectangleF LocalBoundingRectangle { get; }

Property Value

RectangleF

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

MeasureWithoutParentNotification

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

Declaration

cs-api-definition
public bool MeasureWithoutParentNotification { get; set; }

Property Value

bool

Parent

Gets the parent layout element of the current layout element.

Declaration

cs-api-definition
public LayoutElement Parent { get; }

Property Value

LayoutElement

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

PreviousArrangeRect

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

Declaration

cs-api-definition
public RectangleF PreviousArrangeRect { get; }

Property Value

RectangleF

Size

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.

Declaration

cs-api-definition
public SizeF Size { get; set; }

Property Value

SizeF

TotalTransform

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.

Declaration

cs-api-definition
public RadMatrix TotalTransform { get; }

Property Value

RadMatrix

Transform

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

Declaration

cs-api-definition
public RadMatrix Transform { get; }

Property Value

RadMatrix

TreeLevel

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

Declaration

cs-api-definition
public byte TreeLevel { get; protected set; }

Property Value

byte

Methods

Arrange(RectangleF)

Arranges the layout element within the specified rectangle.

Declaration

cs-api-definition
public void Arrange(RectangleF finalRect)

Parameters

finalRect

RectangleF

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

ArrangeCore(RectangleF)

Declaration

cs-api-definition
protected virtual void ArrangeCore(RectangleF finalRect)

Parameters

finalRect

RectangleF

ArrangeOverride(SizeF)

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

Declaration

cs-api-definition
protected virtual SizeF ArrangeOverride(SizeF finalSize)

Parameters

finalSize

SizeF

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.

CreateChildren()

Declaration

cs-api-definition
protected virtual ILinkedListCollection<LayoutElement> CreateChildren()

Returns

ILinkedListCollection<LayoutElement>

CreateChildrenCollection(DocumentStructureCollection)

Declaration

cs-api-definition
protected virtual ILinkedListCollection<LayoutElement> CreateChildrenCollection(DocumentStructureCollection collection)

Parameters

collection

DocumentStructureCollection

Returns

ILinkedListCollection<LayoutElement>

EnsureChildrenCreated()

Declaration

cs-api-definition
protected void EnsureChildrenCreated()

InvalidateArrange()

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

Declaration

cs-api-definition
public void InvalidateArrange()

InvalidateArrange(bool)

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

Declaration

cs-api-definition
public void InvalidateArrange(bool recursive)

Parameters

recursive

bool

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

InvalidateMeasure()

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

Declaration

cs-api-definition
public virtual void InvalidateMeasure()

InvalidateMeasure(bool)

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

Declaration

cs-api-definition
public void InvalidateMeasure(bool recursive)

Parameters

recursive

bool

Indicates whether the parent layout element should also be invalidated.

IsInValidState(bool)

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

Declaration

cs-api-definition
protected bool IsInValidState(bool checkElementTree)

Parameters

checkElementTree

bool

Returns

bool

Measure(SizeF)

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

Declaration

cs-api-definition
public void Measure(SizeF availableSize)

Parameters

availableSize

SizeF

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

MeasureCore(SizeF)

Declaration

cs-api-definition
protected virtual SizeF MeasureCore(SizeF availableSize)

Parameters

availableSize

SizeF

Returns

SizeF

MeasureOverride(SizeF)

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

Declaration

cs-api-definition
protected virtual SizeF MeasureOverride(SizeF availableSize)

Parameters

availableSize

SizeF

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.

OnBitStateChanged(DocumentElementStates, bool, bool)

Notifies the object for a change in its bit state.

Declaration

cs-api-definition
protected virtual void OnBitStateChanged(DocumentElementStates key, bool oldValue, bool newValue)

Parameters

key

DocumentElementStates

oldValue

bool

newValue

bool

OnChildDesiredSizeChanged(LayoutElement)

Declaration

cs-api-definition
protected virtual void OnChildDesiredSizeChanged(LayoutElement child)

Parameters

child

LayoutElement

OnInvalidateArrange()

Declaration

cs-api-definition
protected virtual void OnInvalidateArrange()

OnInvalidateMeasure()

Declaration

cs-api-definition
protected virtual void OnInvalidateMeasure()

OnParentChanged()

Declaration

cs-api-definition
protected virtual void OnParentChanged()

OnParentChanging()

Declaration

cs-api-definition
protected virtual void OnParentChanging()

SetBitState(DocumentElementStates, bool)

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

Declaration

cs-api-definition
protected virtual void SetBitState(DocumentElementStates key, bool value)

Parameters

key

DocumentElementStates

value

bool

SetParent(LayoutElement, LayoutElement)

Declaration

cs-api-definition
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)

Parameters

oldParent

LayoutElement

newParent

LayoutElement

SetParentCore(LayoutElement)

Declaration

cs-api-definition
protected void SetParentCore(LayoutElement newParent)

Parameters

newParent

LayoutElement

ValidateParent(LayoutElement)

Declaration

cs-api-definition
protected virtual void ValidateParent(LayoutElement newParent)

Parameters

newParent

LayoutElement

Events

ParentChanged

Declaration

cs-api-definition
public event EventHandler ParentChanged

Event Value

EventHandler

ParentChanging

Declaration

cs-api-definition
public event EventHandler ParentChanging

Event Value

EventHandler