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
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

[GuidAttribute("d7167a9c-8d5c-4ca4-9de8-8d19b66d1aa5")]
public interface RibbonPosition : IEquatable<RibbonPosition>

NameDescription
System_CAPS_pubpropertyOfficeId

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.

System_CAPS_pubpropertyPositionType

Gets a value that indicates whether the current RibbonPosition represents a location before or after a built-in control, group, or tab.

NameDescription
System_CAPS_pubmethodEquals(T)

(Inherited from IEquatable<T>.)

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.

Return to top
Show: