Ribbon Class

Defines the Ribbon Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is mso14:ribbon.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.CustomUI.Ribbon

Namespace:  DocumentFormat.OpenXml.Office2010.CustomUI
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

声明
<ChildElementInfoAttribute(GetType(QuickAccessToolbar), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Tabs), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ContextualTabs), FileFormatVersions.Office2010)> _
Public Class Ribbon _
    Inherits OpenXmlCompositeElement
用法
Dim instance As Ribbon
[ChildElementInfoAttribute(typeof(QuickAccessToolbar), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Tabs), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ContextualTabs), FileFormatVersions.Office2010)]
public class Ribbon : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • QuickAccessToolbar <mso14:qat>

  • Tabs <mso14:tabs>

  • ContextualTabs <mso14:contextualTabs>

2.3.46 CT_Ribbon

Target namespace: https://schemas.microsoft.com/office/2007/10/customui

Referenced by: CT_CustomUI

Specifies a reference to the main Ribbon of the application.

Child Elements:

qat : A CT_Qat element.

tabs : A CT_Tabs element.

contextualTabs : A CT_ContextualTabs element.

Attributes:

startFromScratch : A boolean attribute that specifies that the Ribbon be reduced to a minimal set of features from which a completely custom Ribbon can be built. If this attribute is omitted, the Ribbon is unchanged.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_Ribbon">

<xsd:all>

<xsd:element name="qat" type="CT_Qat" minOccurs="0" maxOccurs="1">

<xsd:unique name="qatControls">

<xsd:selector xpath="*/*"/>

<xsd:field xpath="@id"/>

</xsd:unique>

</xsd:element>

<xsd:element name="tabs" type="CT_Tabs" minOccurs="0" maxOccurs="1"/>

<xsd:element name="contextualTabs" type="CT_ContextualTabs" minOccurs="0" maxOccurs="1"/>

</xsd:all>

<xsd:attribute name="startFromScratch" type="xsd:boolean" use="optional"/>

</xsd:complexType>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Ribbon Members

DocumentFormat.OpenXml.Office2010.CustomUI Namespace