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

A component that arranges child content in a horizontal or vertical stack with configurable spacing and alignment. Control item spacing via Spacing, container dimensions with Width and Height, orientation through StackLayoutOrientation (Horizontal/Vertical), and alignment using HorizontalAlign and VerticalAlign. Provide content with ChildContent.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikStackLayout : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikStackLayout

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikStackLayout()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

Properties

Defines the content of the StackLayout.

C#
[Parameter]
public RenderFragment ChildContent { get; set; }

Defines the height of the stack container as a CSS value.

C#
[Parameter]
public string Height { get; set; }

Defines the horizontal alignment of the items in the stack. The default value is Stretch. The possible options are Left, Right, Center and Stretch.

C#
[Parameter]
public StackLayoutHorizontalAlign HorizontalAlign { get; set; }

Defines the orientation of the items in the stack. Default value is Horizontal.

C#
[Parameter]
public StackLayoutOrientation Orientation { get; set; }

Defines the spacing between items in the stack. Accepts css unit value (ex: 10px).

C#
[Parameter]
public string Spacing { get; set; }

Defines the vertical alignment of the items in the stack. The default value is Stretch. The possible vertical align options are Top, Bottom, Center and Stretch.

C#
[Parameter]
public StackLayoutVerticalAlign VerticalAlign { get; set; }

Defines the width of the stack container as a CSS value.

C#
[Parameter]
public string Width { get; set; }