New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinForms.Documents.Layout

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public abstract class LayoutElement : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor

Inheritance: objectDisposableObjectRadObjectLayoutElement

Derived Classes: LayoutBox

Implements: ICustomTypeDescriptorIDisposableINotifyPropertyChanged

Inherited Members RadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.DisposeManagedResources()RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

C#
public LayoutElement(DocumentStructureCollection collection)
Parameters:collectionDocumentStructureCollection

Properties

C#
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.

C#
public virtual bool AutoSize { get; }

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

C#
protected DocumentElementStateBitVector BitState { get; }
C#
public bool BypassLayoutPolicies { get; set; }
C#
public ILinkedListCollection<LayoutElement> Children { get; }
C#
public virtual RectangleF ClippedControlBoundingRectangle { get; }
C#
public virtual RectangleF ControlBoundingRectangle { get; }
C#
public SizeF DesiredSize { get; set; }
C#
public bool IsArrangeValid { get; }
C#
public bool IsMeasureInProgress { get; }
C#
public bool IsMeasureValid { get; }
C#
public virtual bool IsTopContainer { get; }
C#
public PointF LayoutOffset { get; }
C#
public RectangleF LocalBoundingRectangle { get; }
C#
public bool MeasureWithoutParentNotification { get; set; }
C#
public LayoutElement Parent { get; }
C#
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.

C#
public SizeF Size { get; set; }
C#
public RadMatrix TotalTransform { get; }
C#
public RadMatrix Transform { get; }

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

C#
public byte TreeLevel { get; protected set; }

Methods

C#
public void Arrange(RectangleF finalRect)
Parameters:finalRectRectangleF
C#
protected virtual void ArrangeCore(RectangleF finalRect)
Parameters:finalRectRectangleF

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

C#
protected virtual SizeF ArrangeOverride(SizeF finalSize)
Parameters:finalSizeSizeF

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.

C#
protected virtual ILinkedListCollection<LayoutElement> CreateChildren()
Returns:

ILinkedListCollection<LayoutElement>

C#
protected virtual ILinkedListCollection<LayoutElement> CreateChildrenCollection(DocumentStructureCollection collection)
Parameters:collectionDocumentStructureCollectionReturns:

ILinkedListCollection<LayoutElement>

C#
protected void EnsureChildrenCreated()
C#
public void InvalidateArrange()
C#
public void InvalidateArrange(bool recursive)
Parameters:recursivebool
C#
public virtual void InvalidateMeasure()
C#
public void InvalidateMeasure(bool recursive)
Parameters:recursivebool

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

C#
protected bool IsInValidState(bool checkElementTree)
Parameters:checkElementTreeboolReturns:

bool

C#
public void Measure(SizeF availableSize)
Parameters:availableSizeSizeF
C#
protected virtual SizeF MeasureCore(SizeF availableSize)
Parameters:availableSizeSizeFReturns:

SizeF

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

C#
protected virtual SizeF MeasureOverride(SizeF availableSize)
Parameters:availableSizeSizeF

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.

Notifies the object for a change in its bit state.

C#
protected virtual void OnBitStateChanged(DocumentElementStates key, bool oldValue, bool newValue)
Parameters:keyDocumentElementStates

The DocumentElementStates key.

oldValuebool

The old value.

newValuebool

The new value.

C#
protected virtual void OnChildDesiredSizeChanged(LayoutElement child)
Parameters:childLayoutElement
C#
protected virtual void OnInvalidateArrange()
C#
protected virtual void OnInvalidateMeasure()
C#
protected virtual void OnParentChanged()
C#
protected virtual void OnParentChanging()

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

C#
protected virtual void SetBitState(DocumentElementStates key, bool value)
Parameters:keyDocumentElementStates

The DocumentElementStates key.

valuebool

The value.

C#
protected virtual void SetParent(LayoutElement oldParent, LayoutElement newParent)
Parameters:oldParentLayoutElementnewParentLayoutElement
C#
protected void SetParentCore(LayoutElement newParent)
Parameters:newParentLayoutElement
C#
protected virtual void ValidateParent(LayoutElement newParent)
Parameters:newParentLayoutElement

Events

C#
public event EventHandler ParentChanged
C#
public event EventHandler ParentChanging