SdtContentCheckBox Class
Defines the SdtContentCheckBox Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is w14:checkbox.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Office2010.Word.SdtContentCheckBox
Namespace: DocumentFormat.OpenXml.Office2010.Word
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
<ChildElementInfoAttribute(GetType(Checked), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(CheckedState), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(UncheckedState), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class SdtContentCheckBox _
Inherits OpenXmlCompositeElement
用法
Dim instance As SdtContentCheckBox
[ChildElementInfoAttribute(typeof(Checked), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CheckedState), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(UncheckedState), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class SdtContentCheckBox : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
Checked <w14:checked>
CheckedState <w14:checkedState>
UncheckedState <w14:uncheckedState>
2.3.22 checkbox
Target namespace: https://schemas.microsoft.com/office/word/2009/2/wordml
A CT_SdtCheckbox element that specifies that the parent structured document tag (as specified in [ISO/IEC-29500-1] §17.5.2) is a checkbox when displayed in the document. The parent structured document tag contents MUST contain a single character and optionally an additional character in a deleted run (as specified in [ISO/IEC-29500-1] §17.13.5.14). See section 2.2.3 for how this element integrates with ISO/IEC-29500-1.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.
<xsd:element name="checkbox" type="CT_SdtCheckbox"/>
See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).
2.5.36 CT_SdtCheckbox
Target namespace: https://schemas.microsoft.com/office/word/2009/2/wordml
Referenced by: checkbox
CT_SdtCheckbox specifies the properties of a structured document tag (as specified in [ISO/IEC-29500-1] §17.5.2) in the form of a checkbox.
Child Elements:
checked : An optional CT_OnOff element that specifies whether the checkbox is checked. By default, a checkbox is unchecked.
checkedState : An optional CT_SdtCheckboxSymbol element that specifies the symbol used to represent the checked state of the checkbox. By default, the symbol used to represent a checked checkbox is the 0x2612 Unicode character in the "MS Gothic" font.
uncheckedState : An optional CT_SdtCheckboxSymbol element that specifies the symbol used to represent the unchecked state of the checkbox. By default, the symbol used to represent an unchecked checkbox is the 0x2610 Unicode character in the "MS Gothic" font.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.
<xsd:complexType name="CT_SdtCheckbox">
<xsd:sequence>
<xsd:element name="checked" type="CT_OnOff" minOccurs="0"/>
<xsd:element name="checkedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
<xsd:element name="uncheckedState" type="CT_SdtCheckboxSymbol" minOccurs="0"/>
</xsd:sequence>
</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.