.NET MAUI DropDownButton ToolbarItem
Add a button displaying a drop-down panel in the Toolbar control using the DropDownButtonToolbarItem.
The exposed properties are:
IsOpen(bool)—Indicating whether the drop-down is currently open.DropDownContentTemplate(ControlTemplate)—Specifies theControlTemplateof the drop-down content. The target type of this template isTelerik.Maui.Controls.DropDownButtonToolbarItemViewContent.DropDownIndicatorTemplate(ControlTemplate)—Specifies theControlTemplateof the drop-down indicator. The target type of this template isTelerik.Maui.Controls.DropDownButtonToolbarItemViewIndicator.Text(string)—Defines the text(target typeLabel) in the toolbar item. You can display an image next to the text.ImageSource(Microsoft.Maui.Controls.ImageSource)—Specifies the source of the image to display in the toolbar item.
Events
The exposed events are:
IsOpenChanged—Raised when theIsOpenproperty has changed.Clicked—Raised when the button is clicked.
Commands
The available commands are:
Command(ICommand)—Specifies the command to execute when the button is clicked.CommandParameter(object)—Specifies the parameter of the command, which is executed when the button is clicked.
Styling
-
Styleproperty with target typeDropDownButtonToolbarItemView. The properties exposed in theDropDownButtonToolbarItemVieware: -
IsOpen(bool)—Indicating whether the drop-down is currently open. -
DropDownHorizontalOffset(double)—Specifies the horizontal offset in pixels of the drop-down from the button. -
DropDownVerticalOffset(double)—Specifies the vertical offset in pixels of the drop-down from the button. -
DropDownIndicatorSpacing(double)—Specifies the spacing in pixels between the drop-down indicator and the button content. -
IsDropDownIndicatorVisible(bool)—Indicating whether the drop-down indicator is visible in the button. -
DropDownPlacement(enum of typeTelerik.Maui.Controls.PlacementMode)— -
DropDownContentStyle(Stylewith target typeTelerik.Maui.Controls.DropDownButtonToolbarItemViewContent)—Specifies the style for the content in the drop-down. -
DropDownIndicatorStyle(Stylewith target typeTelerik.Maui.Controls.DropDownButtonToolbarItemViewIndicator)—Specifies the style for the drop-down indicator.
All other properties that can be applied through style are the properties applicable for ButtonToolbarItemView, LabelToolbarItemView and ToolbarItemView.