The Button page covers the base control. This page documents the rest of the button family: grouped buttons, floating action buttons with expandable menus, split buttons and menu buttons.

Button Groups

Segmented rows of related actions.

ButtonGroup

A Material Design 3.0 Button Group component that arranges buttons in horizontal, vertical, or grid layouts.

MemberKindDescription
ButtonGroupLayout LayoutPropertyGets or sets the layout direction of the button group.
ButtonGroupVariant VariantPropertyGets or sets the button group variant (Material Design 3.0).
float SpacingPropertyGets or sets the spacing between buttons in pixels.
float ButtonWidthPropertyGets or sets the default width for buttons in the group.
float ButtonHeightPropertyGets or sets the default height for buttons in the group.
bool EqualWidthPropertyGets or sets whether all buttons should have equal width.
SKColor GroupBackgroundColorPropertyGets or sets the background color of the button group.
float CornerRadiusPropertyGets or sets the corner radius of the button group.
IReadOnlyList<Button> ButtonsPropertyGets the collection of buttons in the group.
ButtonGroup()MethodInitializes a new instance of the ButtonGroup class.
void AddButton(Button button)MethodAdds a button to the group. The button to add.
bool RemoveButton(Button button)MethodRemoves a button from the group. The button to remove. True if the button was removed; otherwise, false.
static ButtonGroup CreateHorizontalGroup(params string[] buttonTexts)MethodCreates a simple horizontal button group with the specified button texts. The texts for the buttons. A configured ButtonGroup instance.
static ButtonGroup CreateVerticalGroup(params string[] buttonTexts)MethodCreates a vertical button group with the specified button texts. The texts for the buttons. A configured ButtonGroup instance.
static ButtonGroup CreateButtonGrid(string[] buttonTexts, int columns)MethodCreates a button grid with the specified button texts and grid dimensions. The texts for the buttons. The number of columns in the grid. A configured ButtonGroup instance.

Floating Action Buttons

Primary action buttons with expandable menus.

FloatingActionButton

A Material Design 3.0 Floating Action Button (FAB) component.

MemberKindDescription
string IconPropertyGets or sets the icon displayed on the FAB (SVG path or Unicode character).
SKColor BackgroundColorPropertyGets or sets the background color of the FAB.
SKColor IconColorPropertyGets or sets the icon color of the FAB.
FabSize SizePropertyGets or sets the size of the FAB.
FabType TypePropertyGets or sets the type of the FAB.
string ExtendedTextPropertyGets or sets the extended text for extended FAB.
FloatingActionButton()MethodInitializes a new instance of the FloatingActionButton class.
FloatingActionButton(string icon)MethodInitializes a new instance of the FloatingActionButton class with an icon. The icon to display.
override bool ContainsPoint(SKPoint point)MethodDetermines whether the specified point is contained within the FAB. The point to test. True if the point is contained within the FAB.
new bool HandleMouseDown(SKPoint point, InteractionContext context)MethodPublic wrapper for mouse down events (used by demos).
new bool HandleMouseMove(SKPoint point, InteractionContext context)MethodPublic wrapper for mouse move events (used by demos).

FabMenu

A Material Design 3.0 Floating Action Button Menu component. Provides a main FAB that opens a menu with multiple action items.

MemberKindDescription
event EventHandler<FabMenuItemEventArgs> MenuItemClickedEventOccurs when a menu item is clicked.
event EventHandler MenuOpenedEventOccurs when the menu is opened.
event EventHandler MenuClosedEventOccurs when the menu is closed.
FabMenu()MethodInitializes a new instance of the FabMenu class.
string MainIconPropertyGets or sets the main FAB icon.
FloatingActionButton.FabType MainFabTypePropertyGets or sets the main FAB type.
FabMenuDirection DirectionPropertyGets or sets the menu direction.
float ItemSpacingPropertyGets or sets the spacing between menu items.
SKColor OverlayColorPropertyGets or sets the overlay color when the menu is open.
bool IsOpenPropertyGets whether the menu is currently open.
bool IsAnimatingPropertyGets whether the menu is currently animating.
void AddMenuItem(FabMenuItem item)MethodAdds a menu item to the FAB menu. The menu item to add.
void RemoveMenuItem(FabMenuItem item)MethodRemoves a menu item from the FAB menu. The menu item to remove.
void ClearMenuItems()MethodClears all menu items.
void OpenMenu()MethodOpens the FAB menu.
void CloseMenu()MethodCloses the FAB menu.
void ToggleMenu()MethodToggles the FAB menu open/closed state.
override bool ContainsPoint(SKPoint point)MethodDetermines whether the specified point is contained within the FAB menu. The point to test. True if the point is contained within the FAB menu.

FabMenuItem

Represents a menu item in the FAB menu.

Split and Menu Buttons

Buttons that combine a primary action with a menu.

SplitButton

A Material Design 3.0 Split Button component that combines a primary action with a dropdown menu of additional options.

MemberKindDescription
string TextPropertyGets or sets the text displayed on the primary button.
string SelectedTextPropertyGets the text of the currently selected menu item.
SKColor BackgroundColorPropertyGets or sets the background color of the primary button.
new SKColor TextColorPropertyGets or sets the text color of the primary button.
SKColor DropdownButtonColorPropertyGets or sets the background color of the dropdown button.
SKColor DropdownTextColorPropertyGets or sets the text color of the dropdown button.
float CornerRadiusPropertyGets or sets the corner radius of the split button.
ButtonVariant VariantPropertyGets or sets the button variant (Material Design 3.0).
string LeadingIconPropertyGets or sets the leading icon (SVG path or resource name).
string DropdownIconPropertyGets or sets the dropdown icon.
bool IsDropdownOpenPropertyGets or sets whether the dropdown menu is open.
float SeparatorWidthPropertyGets or sets the width of the separator between the primary and dropdown buttons.
SKColor SeparatorColorPropertyGets or sets the color of the separator between the primary and dropdown buttons.
SplitButtonItem SelectedItemPropertyGets the currently selected menu item.
IReadOnlyList<SplitButtonItem> MenuItemsPropertyGets the collection of menu items.
event EventHandler<EventArgs> PrimaryButtonClickedEventOccurs when the primary button is clicked.
event EventHandler<EventArgs> DropdownButtonClickedEventOccurs when the dropdown button is clicked.
event EventHandler<SplitButtonItemSelectedEventArgs> ItemSelectedEventOccurs when a menu item is selected.
event EventHandler<EventArgs> DropdownStateChangedEventOccurs when the dropdown state changes.
SplitButton()MethodInitializes a new instance of the SplitButton class.
SplitButtonItem AddMenuItem(string text, string icon = null)MethodAdds a menu item to the dropdown. The text for the menu item. The icon for the menu item (optional). The created SplitButtonItem.
bool RemoveMenuItem(SplitButtonItem item)MethodRemoves a menu item from the dropdown. The menu item to remove. True if the item was removed successfully.
void ClearMenuItems()MethodClears all menu items from the dropdown.
void SelectItem(SplitButtonItem item)MethodSelects a menu item. The menu item to select.
void SelectItem(int index)MethodSelects a menu item by index. The index of the menu item to select.
static SplitButton Create(string primaryText, params string[] menuItems)MethodCreates a new SplitButton instance with the specified menu items. The text for the primary button. The menu items for the dropdown. A new SplitButton instance.
static SplitButton CreateFilled(string primaryText, params string[] menuItems)MethodCreates a new SplitButton instance with filled variant. The text for the primary button. The menu items for the dropdown. A new SplitButton instance.
static SplitButton CreateOutlined(string primaryText, params string[] menuItems)MethodCreates a new SplitButton instance with outlined variant. The text for the primary button. The menu items for the dropdown. A new SplitButton instance.

MenuButton

A Material Design 3.0 Menu Button component that combines a button with a dropdown menu.

MemberKindDescription
string TextPropertyGets or sets the text displayed on the button.
string IconPropertyGets or sets the icon displayed on the button.
Menu MenuPropertyGets or sets the dropdown menu.
bool IsMenuOpenPropertyGets whether the dropdown menu is currently open.
SKColor ButtonColorPropertyGets or sets the button color.
SKColor HoverColorPropertyGets or sets the hover color.
SKColor PressedColorPropertyGets or sets the pressed color.
float CornerRadiusPropertyGets or sets the corner radius of the button.
ButtonVariant VariantPropertyGets or sets the button variant.
event EventHandler ButtonClickedEventOccurs when the button is clicked.
event EventHandler MenuOpenedEventOccurs when the menu is opened.
event EventHandler MenuClosedEventOccurs when the menu is closed.
MenuButton()MethodInitializes a new instance of the MenuButton class.
MenuButton(string text) : this()MethodInitializes a new instance of the MenuButton class with the specified text. The text to display on the button.
MenuButton(string text, Menu menu) : this(text)MethodInitializes a new instance of the MenuButton class with the specified text and menu. The text to display on the button. The dropdown menu.
void OpenMenu()MethodOpens the dropdown menu.
void CloseMenu()MethodCloses the dropdown menu.
void ToggleMenu()MethodToggles the dropdown menu open/closed state.
new bool HandleMouseDown(SKPoint point, InteractionContext context)MethodPublic wrapper for mouse down events (used by demos).