RibbonPosition Interface

Definition

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.

public interface class RibbonPosition : IEquatable<Microsoft::Office::Tools::Ribbon::RibbonPosition ^>
[System.Runtime.InteropServices.Guid("d7167a9c-8d5c-4ca4-9de8-8d19b66d1aa5")]
public interface RibbonPosition : IEquatable<Microsoft.Office.Tools.Ribbon.RibbonPosition>
[<System.Runtime.InteropServices.Guid("d7167a9c-8d5c-4ca4-9de8-8d19b66d1aa5")>]
type RibbonPosition = interface
    interface IEquatable<RibbonPosition>
Public Interface RibbonPosition
Implements IEquatable(Of RibbonPosition)
Attributes
Implements

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.

Properties

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.

Applies to