menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ListBoxToolbarSettings - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ListBoxToolbarSettings

    Configures toolbar options, available commands, and toolbar location for item management in a SfListBox<TValue, TItem> control.

    Inheritance
    System.Object
    ListBoxToolbarSettings
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ListBoxToolbarSettings : OwningComponentBase
    Remarks

    Use this class to display move-up/down and dual-list transfer toolbars for transferring or reordering items across single or paired ListBox controls.

    Constructors

    ListBoxToolbarSettings()

    Declaration
    public ListBoxToolbarSettings()

    Properties

    Items

    Gets or sets the set of toolbar command names to show above or beside the ListBox for moving or transferring items.

    Declaration
    public string[] Items { get; set; }
    Property Value
    Type Description
    System.String[]

    Accepts any combination of 'MoveUp', 'MoveDown', 'MoveTo', 'MoveFrom', 'MoveAllTo', 'MoveAllFrom'. These command names control which toolbar buttons are shown. Defaults to no toolbar if empty/null.

    Remarks
    • 'MoveUp' / 'MoveDown': Move selected item(s) up or down within the same ListBox.
    • 'MoveTo' / 'MoveFrom' / 'MoveAllTo' / 'MoveAllFrom': Transfer items between two ListBox components in dual-mode scenarios.
    Examples

    This example shows a ListBox configured with "MoveUp" and "MoveDown" toolbars only:

    <SfListBox Value="@value" DataSource="@vehicleData" TValue="string[]" TItem="ListItem">
        <ListBoxFieldSettings Text="Text" Value="ID"></ListBoxFieldSettings>
        <ListBoxToolbarSettings Items="@items"></ListBoxToolbarSettings>
    </SfListBox>
    @code {
        private string[] value = new[] { "List-01" };
        private string[] items = new[] { "MoveUp", "MoveDown" };
        private List<ListItem> vehicleData = new List<ListItem> {
            new ListItem { Text = "Hennessey Venom", ID = "List-01" },
            new ListItem { Text = "Bugatti Chiron", ID = "List-02" },
            new ListItem { Text = "Bugatti Veyron Super Sport", ID = "List-03" }
        };
        public class ListItem { public string Text { get; set; } public string ID { get; set; } }
    }

    Position

    Gets or sets the toolbar placement around the ListBox: left or right.

    Declaration
    public ToolBarPosition Position { get; set; }
    Property Value
    Type Description
    ToolBarPosition

    One of the ToolBarPosition options. The default is Right.

    Remarks

    Set to Left to position the toolbar on the left. Use Right (default) to place it on the right side of the control.

    Methods

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved