Box Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Gallery), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(LabelControl), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ToggleButton), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CheckBox), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(EditBox), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ComboBox), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(DropDownRegular), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Menu), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(DynamicMenu), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(SplitButton), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Box), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ButtonGroup), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(Button), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ControlClone), FileFormatVersions.Office2010)> _
Public Class Box _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Box
[ChildElementInfoAttribute(typeof(Gallery), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(LabelControl), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ToggleButton), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CheckBox), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(EditBox), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ComboBox), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(DropDownRegular), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Menu), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(DynamicMenu), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(SplitButton), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Box), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ButtonGroup), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(Button), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ControlClone), FileFormatVersions.Office2010)]
public class Box : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • ControlClone <mso14:control>

  • LabelControl <mso14:labelControl>

  • Button <mso14:button>

  • ToggleButton <mso14:toggleButton>

  • CheckBox <mso14:checkBox>

  • EditBox <mso14:editBox>

  • ComboBox <mso14:comboBox>

  • DropDownRegular <mso14:dropDown>

  • Gallery <mso14:gallery>

  • Menu <mso14:menu>

  • DynamicMenu <mso14:dynamicMenu>

  • SplitButton <mso14:splitButton>

  • Box <mso14:box>

  • ButtonGroup <mso14:buttonGroup>

2.3.32 CT_Box

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

Referenced by: CT_Box, CT_Group

Specifies a grouping container control which aligns child controls horizontally or vertically.

Child Elements:

control : A CT_ControlClone element.

labelControl : A CT_LabelControl element.

button : A CT_Button element.

toggleButton : A CT_ToggleButton element.

checkBox : A CT_CheckBox element.

editBox : A CT_EditBox element.

comboBox : A CT_ComboBox element.

dropDown : A CT_DropDownRegular element.

gallery : A CT_Gallery element.

menu : A CT_Menu element.

dynamicMenu : A CT_DynamicMenu element.

splitButton : A CT_SplitButton element.

box : A CT_Box element.

buttonGroup : A CT_ButtonGroup 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.

boxStyle : An ST_BoxStyle attribute that specifies the alignment direction of the child controls. If this attribute is omitted, the child controls are laid out horizontally.

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

<xsd:complexType name="CT_Box">

<xsd:group ref="EG_Controls" minOccurs="0" maxOccurs="1000"/>

<xsd:attributeGroup ref="AG_IDCustom"/>

<xsd:attributeGroup ref="AG_Visible"/>

<xsd:attributeGroup ref="AG_PositionAttributes"/>

<xsd:attribute name="boxStyle" type="ST_BoxStyle" 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

Box Members

DocumentFormat.OpenXml.Office2010.CustomUI Namespace