DropDownButton Blazor API
NameTypeDefaultDescription
AutoCloseDelayint100Determines the delay before the opened drop down closes when dropDownOpenMode is set to 'auto'.
DisabledboolfalseEnables or disables the element.
DropDownAppendTostring"null"Sets the parent container of the dropDown (the popup). Used when a CSS property of unknowned parent is interfering with the visibility of the dropDown.
DropDownButtonPositionDropDownButtonPositionDropDownButtonPosition.RightDetermines the position of the drop down button.
DropDownHeightobjectSets the height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
DropDownMaxHeightobjectSets the max height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
DropDownMaxWidthobjectSets the max width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
DropDownMinHeightobjectSets the min height of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
DropDownMinWidthobjectSets the min width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
DropDownOpenModeDropDownOpenModeDropDownOpenMode.DefaultDetermines how the drop down is going to open.
DropDownOverlayboolfalseIf this property is enabled, when the element's dropdown is opened, a transparent overlay is positioned between the dropdown and the rest of the document.
DropDownPlaceholderstring"No Items"Sets a placeholder text to appear when there is no content inside the dropdown.
DropDownPositionDropDownPositionDropDownPosition.AutoDetermines the vertical position of the dropDown. 'Auto' means its automatically determined depending on the viewport size.
DropDownWidthobjectSets the width of the drop down. Default value of empty string means that CSS variables are used. This property should be used when the browser doesn't support CSS variables.
Hintstring""Sets additional helper text below the element. The hint is visible only when the element is focused.
HorizontalScrollBarVisibilityHorizontalScrollBarVisibilityHorizontalScrollBarVisibility.AutoDetermines the visibility of the horizontal Scroll bar inside the drop down.
Labelstring""Sets a label above the element. The label is always visible.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
MessagesobjectN/ASets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
IsOpenedboolfalseDetermines whether the popup is opened or closed
Placeholderstring""Determines the element's placeholder, displayed in the element's action button container.
PlaceholderTemplateobjectN/ADetermines the element's placeholder template, displayed in the element's action button container. You can pass 'string', 'function' or HTMLTemplateElement as a value.
ReadonlyboolfalseDisables user interaction with the element.
ResizeIndicatorboolfalseDetermines whether the resize indicator in the bottom right corner is visible or not.
ResizeModeResizeModeResizeMode.NullDetermines whether the dropDown can be resized or not. When resizing is enabled, a resize bar appears on the top/bottom side of the drop down.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
Themestring""Determines the theme. Theme defines the look of the element
UnfocusableboolfalseIf is set to true, the element cannot be focused.
VerticalScrollBarVisibilityVerticalScrollBarVisibilityVerticalScrollBarVisibility.AutoDetermines the visibility of the vertical scroll bar.
NameTypeArgumentsDescription
AppendChilddynamicdynamic nodeAppends a new HTML node to the drop down.Args: dynamic node - The node to be appended
ClosevoidN/ACloses the dropDown.
GetIsOpenedAsync()Task<bool>'N/A'Gets the &quot;IsOpened&quot; property as Task&lt;bool&gt;.
OpenvoidN/AOpens the dropDown.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
RemoveAllvoidN/ARemoves everything from the drop down.
RemoveChilddynamicdynamic nodeRemoves a child node from the drop down.Args: dynamic node - The node to remove.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
ScrollTovoidint top, int leftScrolls the drop down to a specific position.Args: int top - Y axis coordinate,int left - X axis coordinate
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.
NameTypeDescriptionEvent Detail
OnActionButtonClickEventCallback<Event>This event is triggered when user clicks on the action button. The action button is visible when the "placeholder" is set.N/A
ActionButtonClickedevent DropDownButtonActionButtonClickedEventHandlerThis event is triggered when user clicks on the action button. The action button is visible when the "placeholder" is set.DropDownButtonActionButtonClickedEventArgs
OnCloseEventCallback<Event>This event is triggered when the drop down is closed.N/A
Closedevent DropDownButtonClosedEventHandlerThis event is triggered when the drop down is closed.DropDownButtonClosedEventArgs
OnClosingEventCallback<Event>This event is triggered when the drop down list is about to be closed. This event allows to cancel the closing operation calling event.preventDefault() in the event handler function.N/A
Closingevent DropDownButtonClosingEventHandlerThis event is triggered when the drop down list is about to be closed. This event allows to cancel the closing operation calling event.preventDefault() in the event handler function.DropDownButtonClosingEventArgs
OnDropDownButtonClickEventCallback<Event>This event is triggered when user clicks on the drop down button.N/A
DropDownButtonClickedevent DropDownButtonDropDownButtonClickedEventHandlerThis event is triggered when user clicks on the drop down button.DropDownButtonDropDownButtonClickedEventArgs
OnOpenEventCallback<Event>This event is triggered when the drop down is opened.N/A
Openedevent DropDownButtonOpenedEventHandlerThis event is triggered when the drop down is opened.DropDownButtonOpenedEventArgs
OnOpeningEventCallback<Event>This event is triggered when the drop down is about to be opened. This event allows to cancel the opening operation calling event.preventDefault() in the event handler function.N/A
Openingevent DropDownButtonOpeningEventHandlerThis event is triggered when the drop down is about to be opened. This event allows to cancel the opening operation calling event.preventDefault() in the event handler function.DropDownButtonOpeningEventArgs
OnResizeStartEventCallback<Event>This event is triggered when user starts resizing the drop down.dynamic position- An object containing the current left and top positions of the drop down.
ResizeStartedevent DropDownButtonResizeStartedEventHandlerThis event is triggered when user starts resizing the drop down.DropDownButtonResizeStartedEventArgs
OnResizeEndEventCallback<Event>This event is triggered when user finishes resizing the drop down.dynamic position- An object containing the current left and top positions of the drop down.
ResizeEndedevent DropDownButtonResizeEndedEventHandlerThis event is triggered when user finishes resizing the drop down.DropDownButtonResizeEndedEventArgs
DropDownButtonPosition.Left
DropDownButtonPosition.Right
DropDownButtonPosition.Top
DropDownButtonPosition.Bottom
DropDownOpenMode.None
DropDownOpenMode.Default
DropDownOpenMode.DropDownButton
DropDownOpenMode.Auto
DropDownPosition.Auto
DropDownPosition.Top
DropDownPosition.Bottom
DropDownPosition.OverlayTop
DropDownPosition.OverlayCenter
DropDownPosition.OverlayBottom
DropDownPosition.CenterBottom
DropDownPosition.CenterTop

HorizontalScrollBarVisibility

HorizontalScrollBarVisibility.Auto
HorizontalScrollBarVisibility.Disabled
HorizontalScrollBarVisibility.Hidden
HorizontalScrollBarVisibility.Visible

ResizeMode

ResizeMode.None
ResizeMode.Horizontal
ResizeMode.Vertical
ResizeMode.Both

VerticalScrollBarVisibility

VerticalScrollBarVisibility.Auto
VerticalScrollBarVisibility.Disabled
VerticalScrollBarVisibility.Hidden
VerticalScrollBarVisibility.Visible