RibbonFactory Interface
Provides methods that you can use to create Ribbon controls for a Microsoft Office Ribbon customization.
Namespace: Microsoft.Office.Tools.Ribbon
Assemblies: Microsoft.Office.Tools.Common.v4.0.Utilities (in Microsoft.Office.Tools.Common.v4.0.Utilities.dll)
Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
Syntax
'Declaration
<GuidAttribute("1012BDD2-303F-4464-A64B-3026BD91C31E")> _
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
Public Interface RibbonFactory
[GuidAttribute("1012BDD2-303F-4464-A64B-3026BD91C31E")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface RibbonFactory
The RibbonFactory type exposes the following members.
Properties
Name | Description | |
---|---|---|
RibbonPosition | Gets a RibbonPositionStatics object that you can use to specify the position of a control, group, or tab in a Ribbon customization. |
Top
Methods
Name | Description | |
---|---|---|
_VtblGap1_19 | Infrastructure. | |
CreateOfficeRibbon | Creates a OfficeRibbon object that represents a Ribbon customization. | |
CreateRibbonBox | Creates a RibbonBox object that arranges and aligns controls on a custom Ribbon. | |
CreateRibbonButton | A RibbonButton represents a button on a custom Ribbon. | |
CreateRibbonButtonGroup | Creates a RibbonButtonGroup object that represents a group of buttons on a Ribbon. | |
CreateRibbonCheckBox | Creates a RibbonCheckBox object that represents a check box on a Ribbon. | |
CreateRibbonComboBox | Creates a RibbonComboBox object that represents a combo box on a custom Ribbon. | |
CreateRibbonDialogLauncher | Creates a RibbonDialogLauncher object that represents a small standardized icon on a group that can be used to open a dialog box. | |
CreateRibbonDropDown | 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. | |
CreateRibbonDropDownItem | Creates a RibbonDropDownItem object that represents an item in a drop-down control. | |
CreateRibbonEditBox | Creates a RibbonEditBox object represents an edit box on a Ribbon. | |
CreateRibbonGallery | Creates a RibbonGallery object that represents a control that displays a menu of RibbonDropDownItem objects and RibbonButton controls. | |
CreateRibbonGroup | Creates a RibbonGroup that represents a group of controls on a Ribbon tab. | |
CreateRibbonLabel | Creates a RibbonLabel that represents a label on a RibbonGroup or RibbonBox. | |
CreateRibbonManager | Creates an IRibbonExtensibility object that represents a Ribbon customization. | |
CreateRibbonMenu | Creates a RibbonMenu that represents a menu on a Ribbon tab or on the Microsoft Office Menu. | |
CreateRibbonReadOnlyCollection | Creates a RibbonMenu object that provides access to the IRibbonExtension objects in a Ribbon customization. | |
CreateRibbonSeparator | Creates a RibbonSeparator object that represents a separator control for a group or menu on the Ribbon. | |
CreateRibbonSplitButton | Creates a RibbonSplitButton object that combines a button or a toggle button and a drop-down menu. | |
CreateRibbonTab | Creates a RibbonTab object that contains one or more groups of controls on the Ribbon. | |
CreateRibbonToggleButton | Creates a RibbonToggleButton that represents a toggle button control on a Ribbon. |
Top
Remarks
Note
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.
Examples
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 Function CreateRibbonDropDownItem() As RibbonDropDownItem
Return Me.Factory.CreateRibbonDropDownItem()
End Function
Private Function CreateRibbonMenu() As RibbonMenu
Return Me.Factory.CreateRibbonMenu()
End Function
Private Function CreateRibbonButton() As RibbonButton
Dim button As RibbonButton = Me.Factory.CreateRibbonButton()
AddHandler (button.Click), AddressOf Button_Click
Return button
End Function
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;
}