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

    Specifies the toolbar settings like toolbar items and the toolbar position in a SfListBox<TValue, TItem>.

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

    Constructors

    ListBoxToolbarSettings()

    Declaration
    public ListBoxToolbarSettings()

    Properties

    Items

    Gets or sets a value that indicates the list of toolbar items used for moving items in a same SfListBox<TValue, TItem> or different SfListBox<TValue, TItem>.

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

    The predefined tools are 'MoveUp', 'MoveDown', 'MoveTo', 'MoveFrom', 'MoveAllTo', and 'MoveAllFrom'.

    Remarks

    The options such as 'MoveTo', 'MoveFrom', 'MoveAllTo', and 'MoveAllFrom' are only used to transfer items between different SfListBox<TValue, TItem>.

    Examples

    The below code example, showcases a toolbar options in a SfListBox<TValue, TItem>.

    <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 string[] { "List-01"};
        private string[] items = new string[] { "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 a value that indicates the position of toolbar in the SfListBox<TValue, TItem>.

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

    One of the ToolBarPosition enumeration. The default value is Right.

    Remarks

    If the ToolBarPosition is Left, the toolbar will be positioned to the left of the SfListBox<TValue, TItem>. If the ToolBarPosition is Right, the toolbar will be positioned to the right of the SfListBox<TValue, TItem>.

    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