StackLayoutElement
Represent a stack layout element
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class StackLayoutElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementStackLayoutElement...
Derived Classes:
Implements:
Inherited Members
Constructors
public StackLayoutElement()
Fields
Identifies the property that controls the gap between adjacent child elements.
public static RadProperty ElementSpacingProperty
Identifies the property that selects the axis along which child elements are stacked.
public static RadProperty OrientationProperty
Identifies the property that selects how horizontal stacking responds to right-to-left layout.
public static RadProperty RightToLeftModeProperty
Properties
Comparer
IComparer<RadElement>
Gets or sets a comparer to be used for defining the order of the child elements.
public IComparer<RadElement> Comparer { get; set; }
Gets or sets the element spacing between items.
public int ElementSpacing { get; set; }
The element spacing.
Gets or sets a value indicating whether to fit the available size.
public bool FitInAvailableSize { get; set; }
true if fit the available size; otherwise, false.
Gets or sets the item orientation.
public Orientation Orientation { get; set; }
The orientation.
Gets or sets the right to left mode.
public StackLayoutElement.RightToLeftModes RightToLeftMode { get; set; }
The right to left mode.
Methods
Aligns the rectangle according to orientation and element's alignment.
protected virtual RectangleF AlignRect(RadElement element, RectangleF arrangeRect)
The element.
arrangeRectRectangleFThe arrange rect.
Returns:Arranges the element.
protected virtual void ArrangeElement(RadElement element, RectangleF clientRect, RectangleF finalRect, SizeF finalSize)
The element.
clientRectRectangleFThe client rect.
finalRectRectangleFThe final rect.
finalSizeSizeFThe final size.
Arranges the items horizontally.
protected virtual void ArrangeHorizontally(SizeF finalSize)
The final size.
Arranges the items horizontaly.
protected virtual void ArrangeItemsHorizontaly(RectangleF clientRect, SizeF finalSize, float stretchableWidth, float spacing)
The client rect.
finalSizeSizeFThe final size.
stretchableWidthfloatWidth of the stretchable.
spacingfloatThe spacing.
Arranges children horizontally or vertically according to Orientation.
Arranges the items vertically.
protected virtual void ArrangeVertically(SizeF finalSize)
The final size.
Leaves the stack element unstretched by its parent in both axes by default.
protected override void InitializeFields()
Overrides:
Measures children along the configured orientation, accounting for padding and spacing.
protected override SizeF MeasureOverride(SizeF availableSize)
The maximum size available to the element.
Returns:The desired size required by the stacked children and padding.
Overrides:
When FitInAvailableSize is enabled, non-stretching children are measured before stretching children, and the resulting desired size is capped at the available size.