.NET MAUI SplitButton ToolbarItem
Add a split button in the toolbar using the SplitButtonToolbarItem
. The toolbar item inherits from the DropDownMenuButtonToolbarItem
.
The exposed property is Items
(of type IList<ToolbarItem>
)—Read-only collection of ToolbarItems
to display in the drop-down menu.
DropDownMenuButtonToolbarItem
inherits fromDropDownButtonToolbarItem
. You can apply all properties from theDropDownButtonToolbarItem
to theSplitButtonToolbarItem
. The properties are described in the DropDownButton ToolbarItem article.
<telerik:SplitButtonToolbarItem Text="Save As...">
<telerik:SplitButtonToolbarItem.Style>
<Style TargetType="telerik:SplitButtonToolbarItemView">
<Setter Property="DisplayOptions" Value="Text" />
<Setter Property="MinimumWidthRequest" Value="{OnIdiom Default=110, Phone=125}" />
</Style>
</telerik:SplitButtonToolbarItem.Style>
<telerik:ButtonToolbarItem Text="Save as TXT">
<telerik:ButtonToolbarItem.ImageSource>
<FontImageSource Glyph="{x:Static telerik:TelerikFont.IconFile}"
FontFamily="{x:Static telerik:TelerikFont.Name}"
Size="16" />
</telerik:ButtonToolbarItem.ImageSource>
</telerik:ButtonToolbarItem>
<telerik:ButtonToolbarItem Text="Save as DOCX">
<telerik:ButtonToolbarItem.ImageSource>
<FontImageSource Glyph="{x:Static telerik:TelerikFont.IconFile}"
FontFamily="{x:Static telerik:TelerikFont.Name}"
Size="16" />
</telerik:ButtonToolbarItem.ImageSource>
</telerik:ButtonToolbarItem>
<telerik:ButtonToolbarItem Text="Save as PDF">
<telerik:ButtonToolbarItem.ImageSource>
<FontImageSource Glyph="{x:Static telerik:TelerikFont.IconFile}"
FontFamily="{x:Static telerik:TelerikFont.Name}"
Size="16" />
</telerik:ButtonToolbarItem.ImageSource>
</telerik:ButtonToolbarItem>
</telerik:SplitButtonToolbarItem>
Styling
SplitButtonToolbarItem
has Style
property with target type SplitButtonToolbarItemView
.
The properties that can be applied through style are the properties applicable for DropDownButtonToolbarItemView, ButtonToolbarItemView, ToolbarItemView and LabelToolbarItemView.