New to Telerik UI for Blazor? Start a free 30-day trial

A popup-based ToolBar that can be positioned relative to an anchor or at free viewport coordinates.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikFloatingToolBar : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IAsyncDisposable

Inheritance: objectComponentBaseBaseComponentTelerikFloatingToolBar

Implements: IAsyncDisposableIComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()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.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
public TelerikFloatingToolBar()

Properties

Selects the anchor element. A non-empty value enables anchored positioning; an empty value enables free positioning.

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

Sets the accessible name on the hosted element with role="toolbar".

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

Defines the ToolBar items. Supports the same child components as TelerikToolBar.

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

Renders a drag handle and enables pointer and keyboard movement in free-position mode.

C#
[Parameter]
public bool Draggable { get; set; }

Sets the hosted ToolBar fill mode. Defaults to Solid.

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

Gets or sets the horizontal alignment within the containing element.

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

Sets horizontal spacing in CSS pixels from the applicable anchor or container edge.

C#
[Parameter]
public double HorizontalOffset { get; set; }

Fires when pointer drag ends or keyboard Move mode commits.

C#
[Parameter]
public EventCallback<FloatingToolBarDragEndEventArgs> OnDragEnd { get; set; }

Fires before pointer drag or keyboard Move mode begins. Set IsCancelled to prevent movement.

C#
[Parameter]
public EventCallback<FloatingToolBarDragStartEventArgs> OnDragStart { get; set; }

Fires when drag, keyboard Move mode, or SetPositionAsync(double, double) changes the position.

C#
[Parameter]
public EventCallback<FloatingToolBarMoveEventArgs> OnMove { get; set; }

Configures the static ToolBar overflow strategy. Supported values are None, Menu, and Scroll.

C#
[Parameter]
public FloatingToolBarOverflowMode OverflowMode { get; set; }

Sets the preferred side of the anchor. Defaults to Top.

C#
[Parameter]
public FloatingToolBarPopoverPosition Position { get; set; }

Controls scroll-button placement when OverflowMode is Scroll.

C#
[Parameter]
public FloatingToolBarScrollButtonsPosition ScrollButtonsPosition { get; set; }

Controls scroll-button visibility when OverflowMode is Scroll.

C#
[Parameter]
public FloatingToolBarScrollButtonsVisibility ScrollButtonsVisibility { get; set; }

Sets the Floating ToolBar and hosted ToolBar size. Defaults to Medium.

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

Gets or sets the vertical alignment within the containing element.

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

Sets vertical spacing in CSS pixels from the applicable anchor or container edge.

C#
[Parameter]
public double VerticalOffset { get; set; }

Controls whether the Floating ToolBar is visible. Defaults to false.

C#
[Parameter]
public bool Visible { get; set; }

Fires after the effective visibility changes and enables two-way binding of Visible.

C#
[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }

Sets the width of the Floating ToolBar.

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

Methods

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

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
public ValueTask DisposeAsync()
Returns:

ValueTask

Implements: IAsyncDisposable.DisposeAsync()

Focuses the hosted ToolBar item at the current roving-tabindex position when visible.

C#
public Task FocusAsync()
Returns:

Task

Hides the Floating ToolBar and restores focus when focus was within it.

C#
public Task HideAsync()
Returns:

Task

C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

Retargets a visible Floating ToolBar to the supplied anchor and reruns collision handling.

C#
public Task SetAnchorAsync(string anchorSelector)
Parameters:anchorSelectorstring

The CSS selector of the new anchor element.

Returns:

Task

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: ComponentBase.SetParametersAsync(ParameterView)

Moves a visible free-position Floating ToolBar and fires OnMove.

C#
public Task SetPositionAsync(double x, double y)
Parameters:xdouble

The target viewport-relative X coordinate.

ydouble

The target viewport-relative Y coordinate.

Returns:

Task

Shows the Floating ToolBar using the configured anchor or free-position alignment and clears coordinate overrides.

C#
public Task ShowAsync()
Returns:

Task

Shows the Floating ToolBar at explicit viewport coordinates in free-position mode.

C#
public Task ShowAsync(double x, double y)
Parameters:xdouble

The viewport-relative X coordinate.

ydouble

The viewport-relative Y coordinate.

Returns:

Task

Shows the Floating ToolBar relative to the supplied anchor for this show operation.

C#
public Task ShowAsync(string anchorSelector)
Parameters:anchorSelectorstring

The CSS selector of the anchor element.

Returns:

Task