RibbonFactory Interface

 

Provides methods that you can use to create Ribbon controls for a Microsoft Office Ribbon customization.

Namespace:   Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

[GuidAttribute("1012BDD2-303F-4464-A64B-3026BD91C31E")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface RibbonFactory

NameDescription
System_CAPS_pubpropertyRibbonPosition

Gets a RibbonPositionStatics object that you can use to specify the position of a control, group, or tab in a Ribbon customization.

NameDescription
System_CAPS_pubmethodCreateRibbonBox()

Creates a RibbonBox object that arranges and aligns controls on a custom Ribbon.

System_CAPS_pubmethodCreateRibbonButton()

A RibbonButton represents a button on a custom Ribbon.

System_CAPS_pubmethodCreateRibbonButtonGroup()

Creates a RibbonButtonGroup object that represents a group of buttons on a Ribbon.

System_CAPS_pubmethodCreateRibbonCheckBox()

Creates a RibbonCheckBox object that represents a check box on a Ribbon.

System_CAPS_pubmethodCreateRibbonComboBox()

Creates a RibbonComboBox object that represents a combo box on a custom Ribbon.

System_CAPS_pubmethodCreateRibbonDialogLauncher()

Creates a RibbonDialogLauncher object that represents a small standardized icon on a group that can be used to open a dialog box.

System_CAPS_pubmethodCreateRibbonDropDown()

Creates a RibbonDropDown object that represents a list of items that a user can choose from and a list of Ribbon buttons that a user can click.

System_CAPS_pubmethodCreateRibbonDropDownItem()

Creates a RibbonDropDownItem object that represents an item in a drop-down control.

System_CAPS_pubmethodCreateRibbonEditBox()

Creates a RibbonEditBox object represents an edit box on a Ribbon.

System_CAPS_pubmethodCreateRibbonGallery()

Creates a RibbonGallery object that represents a control that displays a menu of RibbonDropDownItem objects and RibbonButton controls.

System_CAPS_pubmethodCreateRibbonGroup()

Creates a RibbonGroup that represents a group of controls on a Ribbon tab.

System_CAPS_pubmethodCreateRibbonLabel()

Creates a RibbonLabel that represents a label on a RibbonGroup or RibbonBox.

System_CAPS_pubmethodCreateRibbonManager(IRibbonExtension[])

Creates an IRibbonExtensibility object that represents a Ribbon customization.

System_CAPS_pubmethodCreateRibbonMenu()

Creates a RibbonMenu that represents a menu on a Ribbon tab or on the Microsoft Office Menu.

System_CAPS_pubmethodCreateRibbonReadOnlyCollection()

Creates a RibbonMenu object that provides access to the IRibbonExtension objects in a Ribbon customization.

System_CAPS_pubmethodCreateRibbonSeparator()

Creates a RibbonSeparator object that represents a separator control for a group or menu on the Ribbon.

System_CAPS_pubmethodCreateRibbonSplitButton()

Creates a RibbonSplitButton object that combines a button or a toggle button and a drop-down menu.

System_CAPS_pubmethodCreateRibbonTab()

Creates a RibbonTab object that contains one or more groups of controls on the Ribbon.

System_CAPS_pubmethodCreateRibbonToggleButton()

Creates a RibbonToggleButton that represents a toggle button control on a Ribbon.

System_CAPS_noteNote

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

The following example accesses the RibbonFactory instance of the project in the Ribbon code file of an Excel 2010 workbook project. This code uses methods in the RibbonFactory object to create a drop-down item, a menu, and a button. To view the complete sample, see Walkthrough: Updating the Controls on a Ribbon at Run Time.

private RibbonDropDownItem CreateRibbonDropDownItem()
{
    return this.Factory.CreateRibbonDropDownItem();
}
private RibbonMenu CreateRibbonMenu()
{
    return this.Factory.CreateRibbonMenu();
}
private RibbonButton CreateRibbonButton()
{
    RibbonButton button = this.Factory.CreateRibbonButton();
    button.Click += new RibbonControlEventHandler(button_Click);
    return button;
}
Return to top
Show: