Building Block: Server Ribbon
Applies to: SharePoint Foundation 2010
The Server ribbon in Microsoft SharePoint Foundation creates a consistent user interface (UI) when working with SharePoint objects. The top-level elements in the ribbon are Tabs. Tabs appear across the top of the page in a site. Each Tab organizes a set of groups. These groups contain sets of controls. Each group can contain multiple controls and has a label to identify each group. The controls inside the group include buttons, drop-down menus, check boxes, combo boxes, split buttons, and galleries. Each of these controls is operated by a unique command.
Object Model for the Server Ribbon
IRibbonMenu – Represents the interface that is used to implement the ribbon.
SPRibbonButton – Represents a button inside the ribbon.
SPRibbonCommand – Represents a command that is handled by a control on the ribbon.
SPRibbonMenu – Represents a menu that is present on the ribbon.
SPRibbonMenuItem – Represents a control in a menu on the ribbon.
SPRibbonMenuSection – Represents a section of a ribbon menu.
SPRibbonPopulateQueryCommand – Represents a command that populates a dynamic menu in the ribbon from XML.
SPRibbonQueryCommand – Represents a ribbon command for the QueryCommand event.
XML Used for the Server Ribbon
You can define and customize the Server ribbon by using XML in a Feature or through a user custom action. The XML that is used for the ribbon defines each tab, group, and control. The Tab element contains one Groups element. Each Groups element has multiple Group elements. Inside the Group element is a single Controls element that contains multiple types of controls. The types of controls that are available are listed in Architecture of the Server Ribbon. Here is an example of XML code that customizes the ribbon.