ClassLayoutElement
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
LayoutElement(DocumentStructureCollection)
Declaration
public LayoutElement(DocumentStructureCollection collection)
Parameters
collection
Properties
Alignment
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
Children
Declaration
public ILinkedListCollection<LayoutElement> Children { get; }
Property Value
ClippedControlBoundingRectangle
Declaration
public virtual RectangleF ClippedControlBoundingRectangle { get; }
Property Value
ControlBoundingRectangle
Declaration
public virtual RectangleF ControlBoundingRectangle { get; }
Property Value
LocalBoundingRectangle
Declaration
public RectangleF LocalBoundingRectangle { get; }
Property Value
MeasureWithoutParentNotification
Declaration
public bool MeasureWithoutParentNotification { get; set; }
Property Value
PreviousArrangeRect
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.
Methods
Arrange(RectangleF)
Declaration
public void Arrange(RectangleF finalRect)
Parameters
finalRect
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()
Declaration
public void InvalidateArrange()
InvalidateArrange(bool)
Declaration
public void InvalidateArrange(bool recursive)
Parameters
recursive
InvalidateMeasure()
Declaration
public virtual void InvalidateMeasure()
InvalidateMeasure(bool)
Declaration
public void InvalidateMeasure(bool recursive)
Parameters
recursive
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)
Declaration
public void Measure(SizeF availableSize)
Parameters
availableSize
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
The DocumentElementStates key.
oldValue
The old value.
newValue
The new value.
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
The DocumentElementStates key.
value
The 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