CheckBox Class

Checkbox Form Field Properties.When the object is serialized out as xml, its qualified name is w:checkBox.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.CheckBox

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Checked))> _
<ChildElementInfoAttribute(GetType(AutomaticallySizeFormField))> _
<ChildElementInfoAttribute(GetType(DefaultCheckBoxFormFieldState))> _
<ChildElementInfoAttribute(GetType(FormFieldSize))> _
Public Class CheckBox _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CheckBox
[ChildElementInfoAttribute(typeof(Checked))]
[ChildElementInfoAttribute(typeof(AutomaticallySizeFormField))]
[ChildElementInfoAttribute(typeof(DefaultCheckBoxFormFieldState))]
[ChildElementInfoAttribute(typeof(FormFieldSize))]
public class CheckBox : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • FormFieldSize <w:size>

  • AutomaticallySizeFormField <w:sizeAuto>

  • DefaultCheckBoxFormFieldState <w:default>

  • Checked <w:checked>

[ISO/IEC 29500-1 1st Edition]

17.16.2 checkBox (Checkbox Form Field Properties)

This element specifies a set of properties which shall be associated with the parent FORMCHECKBOX checkbox form field (§17.16.5.20) within the document.

If the parent form field is not a checkbox (i.e. its field code does not have a value of FORMCHECKBOX), then these properties can be ignored.

[Example: Consider the following WordprocessingML fragment for the properties of a checkbox form field:

<w:ffData>
<w:checkBox>
<w:size w:val="20" />
    <w:checked w:val="true" />
</w:checkBox>
</w:ffData>

The checkBox element specifies that it contains a set of properties for the parent checkbox form field. In this case, these properties specify that the size of the checkbox must be exactly 10 points via the size element (§17.16.29), and that the current state of the checkbox must be checked via the checked element (§17.16.8). end example]

Parent Elements

ffData (§17.16.17)

Child Elements

Subclause

checked (Checkbox Form Field State)

§17.16.8

default (Default Checkbox Form Field State)

§17.16.12

size (Checkbox Form Field Size)

§17.16.29

sizeAuto (Automatically Size Form Field)

§17.16.30

[Note: The W3C XML Schema definition of this element’s content model (CT_FFCheckBox) is located in §A.1. end note]

© ISO/IEC29500: 2008.

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

CheckBox Members

DocumentFormat.OpenXml.Wordprocessing Namespace