ButtonGroup Class
Defines the ButtonGroup Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is mso14:buttonGroup.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Office2010.CustomUI.ButtonGroup
Namespace: DocumentFormat.OpenXml.Office2010.CustomUI
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'宣言
<ChildElementInfoAttribute(GetType(MenuRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ToggleButtonRegular), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ButtonRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(SplitButtonRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Separator), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(DynamicMenuRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(GalleryRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ControlCloneRegular), FileFormatVersions.Office2010)> _
Public Class ButtonGroup _
Inherits OpenXmlCompositeElement
'使用
Dim instance As ButtonGroup
[ChildElementInfoAttribute(typeof(MenuRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ToggleButtonRegular), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ButtonRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(SplitButtonRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Separator), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(DynamicMenuRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(GalleryRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ControlCloneRegular), FileFormatVersions.Office2010)]
public class ButtonGroup : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
ControlCloneRegular <mso14:control>
ButtonRegular <mso14:button>
ToggleButtonRegular <mso14:toggleButton>
GalleryRegular <mso14:gallery>
MenuRegular <mso14:menu>
DynamicMenuRegular <mso14:dynamicMenu>
SplitButtonRegular <mso14:splitButton>
Separator <mso14:separator>
2.3.36 CT_ButtonGroup
Target namespace: https://schemas.microsoft.com/office/2007/10/customui
Referenced by: CT_Box, CT_Group
Specifies a grouping container which visually groups child controls together.
Child Elements:
control : A CT_ControlCloneRegular element.
button : A CT_ButtonRegular element.
toggleButton : A CT_ToggleButtonRegular element.
gallery : A CT_GalleryRegular element.
menu : A CT_MenuRegular element.
dynamicMenu : A CT_DynamicMenuRegular element.
splitButton : A CT_SplitButtonRegular element.
Attributes:
id : An ST_UniqueID attribute that specifies the identifier of a custom control. All custom controls MUST have unique IDs. The id, idQ and idMso attributes are mutually exclusive. Exactly one of these attributes MUST be specified on all controls.
idQ : An ST_QID attribute that specifies the qualified identifier of a control. This attribute is used to reference controls or containers created by other Custom UI documents. The id, idQ and idMso attributes are mutually exclusive. Exactly one of these attributes MUST be specified on all controls.
visible : A boolean attribute that specifies the visibility state of this control. The visible and getVisible attributes are mutually exclusive. They MUST NOT be used together. If neither of these attributes are specified, then the control defaults to being visible.
getVisible : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the visibility state of this control. The visible and getVisible attributes are mutually exclusive. They MUST NOT be used together. If neither of these attributes are specified, the control defaults to being visible.
insertAfterMso : An ST_ID attribute that specifies the identifier of a built-in control which this control will be inserted after. The insertAfterMso, insertAfterQ, insertBeforeMso and insertBeforeQ attributes are mutually exclusive. They MUST NOT be used together. If none of these attributes are specified, the controls will be appended to the existing set of controls, in the order they are defined in the XML.
insertBeforeMso : An ST_ID attribute that specifies the identifier of a built-in control which this control will be inserted before. The insertAfterMso, insertAfterQ, insertBeforeMso and insertBeforeQ attributes are mutually exclusive. They MUST NOT be used together. If none of these attributes are specified, the controls will be appended to the existing set of controls, in the order they are defined in the XML.
insertAfterQ : An ST_QID attribute that specifies the qualified identifier of a control which this control will be inserted after. The insertAfterMso, insertAfterQ, insertBeforeMso and insertBeforeQ attributes are mutually exclusive. They MUST NOT be used together. If none of these attributes are specified, the controls will be appended to the existing set of controls, in the order they are defined in the XML.
insertBeforeQ : An ST_QID attribute that specifies the qualified identifier of a control which this control will be inserted before. The insertAfterMso, insertAfterQ, insertBeforeMso and insertBeforeQ attributes are mutually exclusive. They MUST NOT be used together. If none of these attributes are specified, the controls will be appended to the existing set of controls, in the order they are defined in the XML.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.
<xsd:complexType name="CT_ButtonGroup">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="1000">
<xsd:element name="control" type="CT_ControlCloneRegular"/>
<xsd:element name="button" type="CT_ButtonRegular"/>
<xsd:element name="toggleButton" type="CT_ToggleButtonRegular"/>
<xsd:element name="gallery" type="CT_GalleryRegular"/>
<xsd:element name="menu" type="CT_MenuRegular"/>
<xsd:element name="dynamicMenu" type="CT_DynamicMenuRegular"/>
<xsd:element name="splitButton" type="CT_SplitButtonRegular"/>
</xsd:choice>
</xsd:sequence>
<xsd:attributeGroup ref="AG_IDCustom"/>
<xsd:attributeGroup ref="AG_Visible"/>
<xsd:attributeGroup ref="AG_PositionAttributes"/>
</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.