SplitButton class
Beep.Skia (core) — class
A Material Design 3.0 Split Button component that combines a primary action with a dropdown menu of additional options.
Members
| Member | Kind | Description |
|---|---|---|
string Text | Property | Gets or sets the text displayed on the primary button. |
string SelectedText | Property | Gets the text of the currently selected menu item. |
SKColor BackgroundColor | Property | Gets or sets the background color of the primary button. |
new SKColor TextColor | Property | Gets or sets the text color of the primary button. |
SKColor DropdownButtonColor | Property | Gets or sets the background color of the dropdown button. |
SKColor DropdownTextColor | Property | Gets or sets the text color of the dropdown button. |
float CornerRadius | Property | Gets or sets the corner radius of the split button. |
ButtonVariant Variant | Property | Gets or sets the button variant (Material Design 3.0). |
string LeadingIcon | Property | Gets or sets the leading icon (SVG path or resource name). |
string DropdownIcon | Property | Gets or sets the dropdown icon. |
bool IsDropdownOpen | Property | Gets or sets whether the dropdown menu is open. |
float SeparatorWidth | Property | Gets or sets the width of the separator between the primary and dropdown buttons. |
SKColor SeparatorColor | Property | Gets or sets the color of the separator between the primary and dropdown buttons. |
SplitButtonItem SelectedItem | Property | Gets the currently selected menu item. |
IReadOnlyList<SplitButtonItem> MenuItems | Property | Gets the collection of menu items. |
event EventHandler<EventArgs> PrimaryButtonClicked | Event | Occurs when the primary button is clicked. |
event EventHandler<EventArgs> DropdownButtonClicked | Event | Occurs when the dropdown button is clicked. |
event EventHandler<SplitButtonItemSelectedEventArgs> ItemSelected | Event | Occurs when a menu item is selected. |
event EventHandler<EventArgs> DropdownStateChanged | Event | Occurs when the dropdown state changes. |
SplitButton() | Method | Initializes a new instance of the SplitButton class. |
SplitButtonItem AddMenuItem(string text, string icon = null) | Method | Adds 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) | Method | Removes a menu item from the dropdown. The menu item to remove. True if the item was removed successfully. |
void ClearMenuItems() | Method | Clears all menu items from the dropdown. |
void SelectItem(SplitButtonItem item) | Method | Selects a menu item. The menu item to select. |
void SelectItem(int index) | Method | Selects a menu item by index. The index of the menu item to select. |
static SplitButton Create(string primaryText, params string[] menuItems) | Method | Creates 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) | Method | Creates 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) | Method | Creates a new SplitButton instance with outlined variant. The text for the primary button. The menu items for the dropdown. A new SplitButton instance. |