ClassLayoutElement
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:
public abstract class LayoutElement
Inheritance: objectLayoutElement
Derived Classes:
Constructors
LayoutElement(DocumentStructureCollection)
Declaration
public LayoutElement(DocumentStructureCollection collection)
Parameters
collection
Properties
Alignment
Represents the alignment options for layout elements in Telerik's document model.
Declaration
public ContentAlignment Alignment { get; set; }
Property Value
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.
BitState
Gets the RadBitVector64 structure that holds all the bit states of the object.
Declaration
protected DocumentElementStateBitVector BitState { get; }
Property Value
BypassLayoutPolicies
Bypasses the layout policies for the specified layout element, allowing for custom arrangement and positioning.
Children
Gets the collection of child layout elements contained within the current layout element.
Declaration
public ILinkedListCollection<LayoutElement> Children { get; }
Property Value
ClippedControlBoundingRectangle
Gets the bounding rectangle of the clipped control for the layout element.
Declaration
public virtual RectangleF ClippedControlBoundingRectangle { get; }
Property Value
ControlBoundingRectangle
Represents the bounding rectangle of a control within the layout element.
Declaration
public virtual RectangleF ControlBoundingRectangle { get; }
Property Value
DesiredSize
Gets the desired size of the layout element.
IsArrangeValid
Gets a value indicating whether the arrangement of the layout element is valid.
IsMeasureInProgress
Gets a value indicating whether the measurement process is currently in progress for the layout element.
IsMeasureValid
Gets a value indicating whether the measure of the layout element is valid.
IsTopContainer
Gets a value indicating whether the current layout element is a top container.
Declaration
public virtual bool IsTopContainer { get; }
Property Value
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.
LocalBoundingRectangle
Gets the local bounding rectangle of the layout element, which represents the area occupied by the element in its local coordinate space.
Declaration
public RectangleF LocalBoundingRectangle { get; }
Property Value
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
public bool MeasureWithoutParentNotification { get; set; }
Property Value
Parent
Gets the parent layout element of the current layout element.
Declaration
public LayoutElement Parent { get; }
Property Value
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
public RectangleF PreviousArrangeRect { get; }
Property Value
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.
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.
Transform
Applies a transformation to the layout element, modifying its properties accordingly.
Methods
Arrange(RectangleF)
Arranges the layout element within the specified rectangle.
Declaration
public void Arrange(RectangleF finalRect)
Parameters
finalRect
The rectangle that defines the area in which the layout element should be arranged.
ArrangeCore(RectangleF)
Declaration
protected virtual void ArrangeCore(RectangleF finalRect)
Parameters
finalRect
ArrangeOverride(SizeF)
Arranges the LayoutElement to its final location. The element must call the Arrange method of each of its children.
Declaration
protected virtual SizeF ArrangeOverride(SizeF finalSize)
Parameters
finalSize
The size that is available for element.
Returns
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
protected virtual ILinkedListCollection<LayoutElement> CreateChildren()
Returns
CreateChildrenCollection(DocumentStructureCollection)
Declaration
protected virtual ILinkedListCollection<LayoutElement> CreateChildrenCollection(DocumentStructureCollection collection)
Parameters
collection
Returns
EnsureChildrenCreated()
Declaration
protected void EnsureChildrenCreated()
InvalidateArrange()
Invalidates the arrangement of the layout element, forcing it to re-calculate its layout.
Declaration
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
public void InvalidateArrange(bool recursive)
Parameters
recursive
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
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
public void InvalidateMeasure(bool recursive)
Parameters
recursive
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.
Measure(SizeF)
Measures the specified size of the layout element and returns the measured size.
Declaration
public void Measure(SizeF availableSize)
Parameters
availableSize
The available size that the layout element should use for measuring.
MeasureOverride(SizeF)
Measures the space required by the LayoutElement Used by the layout system.
Declaration
protected virtual SizeF MeasureOverride(SizeF availableSize)
Parameters
availableSize
The size that is available to the LayoutElement. The available size can be infinity (to take the full size of the element)
Returns
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
protected virtual void OnBitStateChanged(DocumentElementStates key, bool oldValue, bool newValue)
Parameters
key
oldValue
newValue
OnChildDesiredSizeChanged(LayoutElement)
Declaration
protected virtual void OnChildDesiredSizeChanged(LayoutElement child)
Parameters
child
OnInvalidateArrange()
Declaration
protected virtual void OnInvalidateArrange()
OnInvalidateMeasure()
Declaration
protected virtual void OnInvalidateMeasure()
OnParentChanged()
Declaration
protected virtual void OnParentChanged()
OnParentChanging()
Declaration
protected virtual void OnParentChanging()
SetBitState(DocumentElementStates, bool)
Applies the specified boolean value to the BitVector of the object.
Declaration
protected virtual void SetBitState(DocumentElementStates key, bool value)
Parameters
key
value
SetParent(LayoutElement, LayoutElement)
Declaration
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)
Parameters
oldParent
newParent
SetParentCore(LayoutElement)
Declaration
protected void SetParentCore(LayoutElement newParent)
Parameters
newParent
ValidateParent(LayoutElement)
Declaration
protected virtual void ValidateParent(LayoutElement newParent)
Parameters
newParent