RibbonSplitButton

Represents a RibbonMRUSplitButton control in the SharePoint Server Ribbon. MRU refers to "Most

Inheritance Hierarchy


Assembly: QASPRibbon.dll
Namespace: QASPRibbon.Controls

Properties

Property Type Description
Id String A string that identifies the split button, such as "RibbonControl". (Inherited from RibbonElement)
Title String A string value representing the split button's label. (Inherited from RibbonElement)
PopulateDynamically Boolean A value that indicates whether a menu will be created dynamically (True) or not (False). The default is False.
PopulateOnlyOnce Boolean A value that indicates whether a dynamic menu will be populated only the first time that it is accessed. The default is False.
CacheMenuVersions Boolean A value that indicates whether constructed versions of a dynamic menu is stored to use in next time. The default is False.
Sections IEnumerable<RibbonMenuSection> Sections used in root level of this split button.
Visible Boolean A value that indicates whether a split button control is rendered on the ribbon. (Inherited from RibbonControl)
Enabled Boolean A value that indicates whether a split button control is enabled. (Inherited from RibbonVisualControl)
ToolTip RibbonToolTip The tooltip of the split button. (Inherited from RibbonVisualControl)
OnClientActivate String Client-side script that executes when a split button is activated. (Inherited from RibbonButton)
OnClientClick String Client-side script that executes when a split button's Click event is raised. (Inherited from RibbonButton)
OnClientStateCheck String Client-side script that executes before checking split button is enabled or not. (Inherited from RibbonButton)
OnClientMenuClose String Client-side script that executes when menu is closed.
OnClientMenuOpen String Client-side script that executes when menu is populated.

Constructors

public RibbonSplitButton()

public RibbonSplitButton(string id)

public RibbonSplitButton(string id, string title)

Example

The following example defines a split button control with tooltip.
//ToolTip
var simpleSplitButtonToolTip = new RibbonToolTip("ToolTip Title", "ToolTip Description");
//SplitButton
var simpleSplitButton = new RibbonSplitButton("CustomSplitButton", "Split Button")
                    {
                        OnClientClick = "console.log('CustomSplitButton has been clicked');",
                        ToolTip = simpleSplitButtonToolTip,
                        Image = RibbonImageDefinition.Standard(7, 3),
                        Sections = new []
                            {
                                new RibbonMenuSection("s1", "Section 1")
                                {
                                    DisplayMode = RibbonMenuDisplayMode.Menu16,
                                    Controls = new RibbonControl[]
                                    {
                                        new RibbonButton("Second", "SecondButton")
                                        {
                                            OnClientClick = "console.log('SecondButton has been clicked');",
                                            Image = RibbonImageDefinition.Standard(6, 3)
                                        }
                                    },
                                    MaxHeight = 400,
                                    Scrollable = false
                                }
                            }
                    };
simpleSplitButton.OnAction += new RibbonButtonEventHandler(simpleSplitButton_OnAction);


Method to handle split button click event:
void simpleSplitButton_OnAction(object sender, RibbonButtonEventArgs e)
{
    var currentSplitButton = e.Instance;
}

See also




Last edited Dec 25, 2012 at 9:12 AM by VitalyZhukov, version 7

Comments

No comments yet.