Compartilhar via


RibbonReadOnlyCollection Interface

Definition

Provides access to the IRibbonExtension objects in a Ribbon customization.

public interface class RibbonReadOnlyCollection : System::Collections::Generic::ICollection<Microsoft::Office::Tools::Ribbon::IRibbonExtension ^>, System::Collections::Generic::IEnumerable<Microsoft::Office::Tools::Ribbon::IRibbonExtension ^>, System::Collections::Generic::IList<Microsoft::Office::Tools::Ribbon::IRibbonExtension ^>
[System.Runtime.InteropServices.Guid("c3b587bc-42bc-401b-a1e7-f85777d5156a")]
public interface RibbonReadOnlyCollection : System.Collections.Generic.ICollection<Microsoft.Office.Tools.Ribbon.IRibbonExtension>, System.Collections.Generic.IEnumerable<Microsoft.Office.Tools.Ribbon.IRibbonExtension>, System.Collections.Generic.IList<Microsoft.Office.Tools.Ribbon.IRibbonExtension>
[<System.Runtime.InteropServices.Guid("c3b587bc-42bc-401b-a1e7-f85777d5156a")>]
type RibbonReadOnlyCollection = interface
    interface IList<IRibbonExtension>
    interface ICollection<IRibbonExtension>
    interface seq<IRibbonExtension>
    interface IEnumerable
Public Interface RibbonReadOnlyCollection
Implements ICollection(Of IRibbonExtension), IEnumerable(Of IRibbonExtension), IList(Of IRibbonExtension)
Attributes
Implements

Remarks

The collection represented by this object can contain either all IRibbonExtension objects of any type in a Ribbon customization, or only those IRibbonExtension objects for a particular message class or Microsoft Office application.

When you add a Ribbon to a project, Visual Studio adds the Globals class to your application. The Ribbons property of the Globals class returns an instance that is derived from the RibbonCollectionBase class. You can use the Globals.Ribbons collection to access Ribbons that are associated with your Office customization.

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.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 or later. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

Methods

GetRibbon(Type)

Returns an instance of an IRibbonExtension of the specified type, if it exists in this RibbonReadOnlyCollection.

GetRibbonContextCollection(Object, Type)

Returns a collection of IRibbonExtension objects that are associated with a specified message class or application.

Applies to