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:
public abstract class LayoutElement
Inheritance: objectLayoutElement
Derived Classes:
Constructors
public LayoutElement(DocumentStructureCollection collection)
Properties
Represents the alignment options for layout elements in Telerik's document model.
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.
public virtual bool AutoSize { get; }
Gets the RadBitVector64 structure that holds all the bit states of the object.
protected DocumentElementStateBitVector BitState { get; }
Bypasses the layout policies for the specified layout element, allowing for custom arrangement and positioning.
public bool BypassLayoutPolicies { get; set; }
Gets the collection of child layout elements contained within the current layout element.
public ILinkedListCollection<LayoutElement> Children { get; }
Gets the bounding rectangle of the clipped control for the layout element.
public virtual RectangleF ClippedControlBoundingRectangle { get; }
Represents the bounding rectangle of a control within the layout element.
public virtual RectangleF ControlBoundingRectangle { get; }
Gets the desired size of the layout element.
public SizeF DesiredSize { get; set; }
Gets a value indicating whether the arrangement of the layout element is valid.
public bool IsArrangeValid { get; }
Gets a value indicating whether the measurement process is currently in progress for the layout element.
public bool IsMeasureInProgress { get; }
Gets a value indicating whether the measure of the layout element is valid.
public bool IsMeasureValid { get; }
Gets a value indicating whether the current layout element is a top container.
public virtual bool IsTopContainer { get; }
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.
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.
public RectangleF LocalBoundingRectangle { get; }
A rectangle structure that defines the local bounds of the layout element.
Measures the layout of the current element without notifying its parent.
public bool MeasureWithoutParentNotification { get; set; }
Gets the parent layout element of the current layout element.
public LayoutElement Parent { get; }
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.
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.
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.
public RadMatrix TotalTransform { get; }
Applies a transformation to the layout element, modifying its properties accordingly.
public RadMatrix Transform { get; }
Methods
Arranges the layout element within the specified rectangle.
public void Arrange(RectangleF finalRect)
The rectangle that defines the area in which the layout element should be arranged.
Arranges the LayoutElement to its final location. The element must call the Arrange method of each of its children.
protected virtual SizeF ArrangeOverride(SizeF 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.
In this method call to the Arrange method of each child must be made.
protected virtual ILinkedListCollection<LayoutElement> CreateChildren()
protected virtual ILinkedListCollection<LayoutElement> CreateChildrenCollection(DocumentStructureCollection collection)
protected void EnsureChildrenCreated()
Invalidates the arrangement of the layout element, forcing it to re-calculate its layout.
public void InvalidateArrange()
Invalidates the current arrangement of the layout element, causing it to be re-measured and arranged on the next layout cycle.
public void InvalidateArrange(bool recursive)
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.
public virtual void InvalidateMeasure()
Invalidates the measurement of the layout element, forcing it to recalculate its size during the next layout pass.
public void InvalidateMeasure(bool recursive)
Indicates whether the parent layout element should also be invalidated.
Measures the specified size of the layout element and returns the measured size.
public void Measure(SizeF availableSize)
The available size that the layout element should use for measuring.
Measures the space required by the LayoutElement Used by the layout system.
protected virtual SizeF MeasureOverride(SizeF 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.
In this method call to the Measure method of each child must be made.
Notifies the object for a change in its bit state.
protected virtual void OnBitStateChanged(DocumentElementStates key, bool oldValue, bool newValue)
protected virtual void OnChildDesiredSizeChanged(LayoutElement child)
protected virtual void OnInvalidateArrange()
protected virtual void OnInvalidateMeasure()
protected virtual void OnParentChanged()
protected virtual void OnParentChanging()
Applies the specified boolean value to the BitVector of the object.
protected virtual void SetBitState(DocumentElementStates key, bool value)
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)
Events
public event EventHandler ParentChanged
public event EventHandler ParentChanging