共用方式為


RadioGroup Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(RadioButtonBackstageItem), FileFormatVersions.Office2010)> _
Public Class RadioGroup _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As RadioGroup
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(RadioButtonBackstageItem), FileFormatVersions.Office2010)]
public class RadioGroup : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • RadioButtonBackstageItem <mso14:radioButton>

2.3.58 CT_RadioGroup

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

Referenced by: CT_Form, CT_GroupBox, CT_LayoutContainer

Specifies a group of radio buttons.

Child Elements:

radioButton : A CT_OutSpaceItem 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.

idMso : An ST_ID attribute that specifies the identifier of a built-in control. The id, idQ and idMso attributes are mutually exclusive. Exactly one of these attributes MUST be specified.

tag : An ST_String attribute that specifies an arbitrary string which provides additional information about this control during callback function calls. If this attribute is omitted, the value defaults to an empty string.

alignLabel : An ST_AlignLabel attribute that specifies how the label of this control is aligned relative to the control. If this attribute is omitted, the label defaults to the top left alignment.

expand : An ST_Expand attribute that specifies how this control expands within its container. If this attribute is omitted, the control does not expand.

layout : An ST_Layout attribute that specifies how the child controls of this control are laid out. If this attribute is omitted, the child controls are laid out horizontally.

enabled : A boolean attribute that specifies the enabled state of this control. The enabled and getEnabled attributes are mutually exclusive. They MUST NOT be used together. If neither attribute is specified, the control defaults to being enabled.

getEnabled : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the enabled state of this control. The enabled and getEnabled attributes are mutually exclusive. They MUST NOT be used together. If neither attribute is specified, the control defaults to being enabled.

label : An ST_String attribute that specifies a string which is displayed as the label of this control. The label and getLabel attributes are mutually exclusive. They MUST NOT be used together. If neither attribute is specified, then a label is not displayed.

getLabel : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the label of this control. The label and getLabel attributes are mutually exclusive. They MUST NOT be used together. If neither attribute is specified, then a label is not displayed.

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.

onAction : An ST_Delegate attribute that specifies the name of a callback function which is called when this control is invoked by the user.

keytip : An ST_Keytip attribute that specifies a string which is displayed as the KeyTip for this control. The keytip and getKeytip attributes are mutually exclusive. They MUST NOT be used together. If neither of these attributes are specified, a KeyTip is not displayed.

getKeytip : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the KeyTip for this control. The keytip and getKeytip attributes are mutually exclusive. They MUST NOT be used together. If neither of these attributes are specified, a KeyTip is not displayed.

getSelectedItemIndex : An ST_Delegate attribute that specifies the name of a callback function which is called to determine which radio button is selected, identified by index. If this attribute is omitted, the first radio button is selected by default.

getItemCount : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the number of radio buttons in this group. If this attribute is omitted then the control displays the radio buttons which are specified as child elements. If this attribute is omitted and no child elements are specified then the radio group is empty. If both this attribute and child elements are specified then the child elements are ignored.

getItemLabel : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the label of a radio button, identified by index. If this attribute is omitted, dynamically created radio buttons will not display labels.

getItemID : An ST_Delegate attribute that specifies the name of a callback function which is called to determine the identifier of a radio button, identified by index. If this attribute is omitted, dynamically created radio buttons will have blank IDs.

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

<xsd:complexType name="CT_RadioGroup">

<xsd:sequence>

<xsd:element name="radioButton" type="CT_OutSpaceItem" minOccurs="0" maxOccurs="1000"/>

</xsd:sequence>

<xsd:attributeGroup ref="AG_IDAttributes"/>

<xsd:attributeGroup ref="AG_AlignAttributes"/>

<xsd:attributeGroup ref="AG_LayoutAttributes"/>

<xsd:attributeGroup ref="AG_Enabled"/>

<xsd:attributeGroup ref="AG_Label"/>

<xsd:attributeGroup ref="AG_Visible"/>

<xsd:attributeGroup ref="AG_Action"/>

<xsd:attributeGroup ref="AG_Keytip"/>

<xsd:attribute name="getSelectedItemIndex" type="ST_Delegate" use="optional"/>

<xsd:attribute name="getItemCount" type="ST_Delegate" use="optional"/>

<xsd:attribute name="getItemLabel" type="ST_Delegate" use="optional"/>

<xsd:attribute name="getItemID" type="ST_Delegate" 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

RadioGroup Members

DocumentFormat.OpenXml.Office2010.CustomUI Namespace