RibbonPosition Interface
Represents the location of a Ribbon control on the Microsoft Office Menu relative to a built-in control, the location of a tab relative to a built-in tab, or the location of a group relative to a built-in group.
Namespace: Microsoft.Office.Tools.Ribbon
Assemblies: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
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)
Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
<GuidAttribute("d7167a9c-8d5c-4ca4-9de8-8d19b66d1aa5")> _
Public Interface RibbonPosition _
Inherits IEquatable(Of RibbonPosition)
[GuidAttribute("d7167a9c-8d5c-4ca4-9de8-8d19b66d1aa5")]
public interface RibbonPosition : IEquatable<RibbonPosition>
The RibbonPosition type exposes the following members.
Properties
Name | Description | |
---|---|---|
OfficeId | Gets the ID of the built-in Ribbon control, group, or tab that the current RibbonPosition uses to define a relative location for another control, group, or tab. | |
PositionType | Gets a value that indicates whether the current RibbonPosition represents a location before or after a built-in control, group, or tab. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Indicates whether the current object is equal to another object of the same type. (Inherited from IEquatable<RibbonPosition>.) |
Top
Remarks
Use the Position property of a RibbonGroup to specify the location of a group on a built-in tab, relative to a built-in group on the tab. For more information, see How to: Customize a Built-in Tab.
Use the Position property of controls that can be used on the Microsoft Office Menu, such as RibbonButton, to specify the location of the control relative to a built-in control on the menu. The Position property of these controls has no effect when the controls are placed on a Ribbon tab. For more information, see How to: Add Controls to the Backstage View.
Use the Position property of a RibbonTab to specify the location of the tab relative to a built-in tab.
To create an RibbonPosition object, call the AfterOfficeId method or the BeforeOfficeId method of the RibbonPositionStatics object.
You can get a RibbonPositionStatics object at run time by using the RibbonPosition property of the RibbonFactory object.
There are two ways to access the RibbonFactory object:
By using the Factory property of the Ribbon class. Use this approach from code in your Ribbon class.
By using the Globals.Factory.GetRibbonFactory method. Use this approach from code outside your Ribbon class.
See Also
Reference
Microsoft.Office.Tools.Ribbon Namespace
Other Resources
How to: Add Controls to the Backstage View