Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxDropDownButtonBase.DropDownContentTemplate Property

Specifies a template for the drop-down window content.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public RenderFragment DropDownContentTemplate { get; set; }

#Property Value

Type Default Description
RenderFragment null

The template content.

#Remarks

Use the DropDownContentTemplate property to display custom content within the target element’s drop-down window. The following components implement the DropDownContentTemplate property:

DxDropDownButton
A toggleable button that reveals a drop-down element with a list of commands or custom content.
DxSplitButton
A composite control that consists of a primary button and a toggleable secondary button that reveals a drop-down element.
DxDropDownButtonItem
Defines a drop-down list item. Used in DxDropDownButton or DxSplitButton.

#Example

The following code snippet displays a search box within the Click to search item’s drop-down window in the DxDropDownButton component:

DxDropDownButtonItem - Custom DropDown Content

Razor
<DxDropDownButton Text="Blazor Components"
                  RenderStyle="ButtonRenderStyle.Secondary">
    <Items>
        <DxDropDownButtonItem Text="Documentation" />
        <DxDropDownButtonItem Text="Demos" />
        <DxDropDownButtonItem Text="Click to search">
            <DropDownContentTemplate>
                <div class="d-flex flex-row align-items-center h-100">
                    <DxSearchBox CssClass="search py-0" aria-label="Search" />
                </div>
            </DropDownContentTemplate>
        </DxDropDownButtonItem>
    </Items>
</DxDropDownButton>
See Also