RibbonBarItemSplitButton
Namespace: Wisej.Web.Ext.RibbonBar
Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)
Represents a split button in a RibbonBarGroup.
- C#
- VB.NET
public class RibbonBarItemSplitButton : RibbonBarItemButton
Public Class RibbonBarItemSplitButton
Inherits RibbonBarItemButton
Unlike the RibbonBarItemButton, which opens the drop down menu when clicked anywhere, the split button is made of two parts: clicking the main part fires the Click and ItemClick events, while clicking the arrow opens the drop down menu defined in MenuItems.
Example:
Creating a split button that executes the default action or shows more options:
var undo = new RibbonBarItemSplitButton { Name = "undo", Text = "Undo", ImageSource = "icon-undo" };
undo.MenuItems.Add(new MenuItem("Undo All") { Name = "undoAll" });
undo.Click += (s, e) => Undo();
undo.ItemClicked += (s, e) =>
{
if (e.MenuItem.Name == "undoAll")
UndoAll();
};
this.ribbonBarGroup1.Items.Add(undo);
Constructors
RibbonBarItemSplitButton()
Initializes a new instance of RibbonBarItemSplitButton.
Methods
OnWebEvent(e)
Processes the event from the client.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Event arguments. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
Implements
| Name | Description |
|---|---|
| IUserData | |
| IWisejComponent | |
| IWisejSerializable |