Represents a stack layout element that arranges its children horizontally or vertically. Is also offers ElementSpacing property and respects the element's alignment.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class StackLayoutElementLite : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementStackLayoutElementLite...
Implements:
Inherited Members
Constructors
public StackLayoutElementLite()
Fields
Identifies the spacing property that adds a gap between adjacent children along the flow axis; its default is zero.
public static RadProperty ElementSpacingProperty
Identifies the orientation property that selects the child-flow axis; its default is horizontal.
public static RadProperty OrientationProperty
Identifies the property that controls child-order or offset reversal for horizontal right-to-left layout. Its default is ReverseItems.
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 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 StackLayoutElementLite to its final location. The element must call the Arrange method of each of its children.
protected override 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.
Overrides:
In this method call to the Arrange method of each child must be made.
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
protected override void InitializeFields()
Overrides:
Measures the element.
protected virtual void MeasureElement(RadElement element, ref SizeF availableSize, ref SizeF parentDesiredSize)
The element to measure.
availableSizeSizeFThe available size.
parentDesiredSizeSizeFThe desired size of its parent.
Measures the space required by the StackLayoutElementLite
Used by the layout system.
protected override SizeF MeasureOverride(SizeF availableSize)
The size that is available to the StackLayoutElementLite. 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.
Overrides:
In this method call to the Measure method of each child must be made.