Back to Devexpress

DxToolbarItem.DropDownVisible Property

blazor-devexpress-dot-blazor-dot-dxtoolbaritem-1be026b8.md

latest2.3 KB
Original Source

DxToolbarItem.DropDownVisible Property

Specifies the state of an item’s drop-down window (visible/hidden).

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(false)]
[Parameter]
public bool DropDownVisible { get; set; }

Property Value

TypeDefaultDescription
Booleanfalse

true, if the drop-down window is displayed; otherwise, false.

|

Remarks

Each Toolbar item can have multiple child items specified as elements of the parent item’s Items collection. A root-level toolbar item with child items has a drop-down button that displays a hierarchical pop-up menu when clicked.

Use the DropDownVisible property to show/hide a drop-down item’s children. To respond to the property change, handle the DropDownVisibleChanged event.

razor
<p>Is item exapnded - @IsDropDownVisible</p>
<DxToolbar>
    <DxToolbarItem Text="Data operations" @bind-DropDownVisible="@IsDropDownVisible">
        <Items>
            <DxToolbarItem Text="Insert"></DxToolbarItem>
            <DxToolbarItem Text="Edit"></DxToolbarItem>
            <DxToolbarItem Text="Delete"></DxToolbarItem>
        </Items>
    </DxToolbarItem>
</DxToolbar>

@code {
    bool IsDropDownVisible = false;
}

You can handle a drop-down item’s button as one button or split it into two buttons - a regular button and a drop-down button that invokes a pop-up window. To enable this behavior, set the SplitDropDownButton property to true.

Run Demo: Toolbar - Drop-Down Items

See Also

SplitDropDownButton

DxToolbarItem Class

DxToolbarItem Members

DevExpress.Blazor Namespace