LayoutElement
Definition
Namespace:Telerik.WinForms.Documents.Layout
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class LayoutElement : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectLayoutElement
Derived Classes:
Implements:
Inherited Members
Constructors
public LayoutElement(DocumentStructureCollection collection)
Properties
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; }
public bool BypassLayoutPolicies { get; set; }
public ILinkedListCollection<LayoutElement> Children { get; }
public virtual RectangleF ClippedControlBoundingRectangle { get; }
public virtual RectangleF ControlBoundingRectangle { get; }
public SizeF DesiredSize { get; set; }
public bool IsArrangeValid { get; }
public bool IsMeasureInProgress { get; }
public bool IsMeasureValid { get; }
public virtual bool IsTopContainer { get; }
public PointF LayoutOffset { get; }
public RectangleF LocalBoundingRectangle { get; }
public bool MeasureWithoutParentNotification { get; set; }
public LayoutElement Parent { get; }
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; }
public RadMatrix TotalTransform { get; }
Methods
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()
public void InvalidateArrange()
public virtual void InvalidateMeasure()
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)
The DocumentElementStates key.
oldValueboolThe old value.
newValueboolThe new value.
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)
The DocumentElementStates key.
valueboolThe value.
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)
Events
public event EventHandler ParentChanged
public event EventHandler ParentChanging