ListItem class
Combo Box List Item. When the object is serialized out as xml, its qualified name is w:listItem.
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.ListItem
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
[ISO/IEC 29500-1 1st Edition]
listItem (Combo Box List Item)
This element specifies a single list item within the parent combo box structured document tag. Each list item shall be displayed in the list displayed for the parent structured document tag (if a user interface is present).
[Example: Consider the following combo box structured document tag:
<w:sdt>
<w:sdtPr>
<w:comboBox>
<w:listItem w:displayText="Zero" w:value="0"/>
<w:listItem w:displayText="One" w:value="1"/>
</w:comboBox>
</w:sdtPr>
…</w:sdt>Each listItem element within the comboBox element specifies a single list item entry, in this case resulting in two list items within the parent combo box structured document tag. end example]
Parent Elements |
|---|
comboBox (§17.5.2.5) |
Attributes | Description |
|---|---|
displayText (List Entry Display Text) | Specifies the text to display in the run content (as well as any supplied user interface) in place of the value attribute contents for this drop-down list entry. This value shall be used as follows:
If this attribute is omitted, then the content of the value attribute shall be used as the display text for the current list item entry. [Example: Consider the following drop-down list structured document tag: <w:sdt>
<w:sdtPr>
<w:dropDownList>
<w:listItem w:displayText="The Letter A" w:value="a"/>
<w:listItem w:displayText="The Letter B" w:value="b"/>
</w:
dropDownList>
</w:sdtPr>
…</w:sdt>The displayText attribute for the first entry is The Letter A and the second is The Letter B, therefore, these values are used to determine the display text if the parent structured document tag is mapped to custom XML data in a custom XML data part. end example] The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13). |
value (List Entry Value) | Specifies the value for the current list item entry. This value shall be used as follows:
[Example: Consider the following combo box structured document tag: <w:sdt>
<w:sdtPr>
<w:comboBox>
<w:listItem w:displayText="Zero" w:value="0"/>
<w:listItem w:displayText="One" w:value="1"/>
</w:comboBox>
</w:sdtPr>
…</w:sdt>The value attribute for the first entry is 0 and the second is 1, therefore, these values are used to determine the display text if the parent structured document tag is mapped to custom XML data in a custom XML data part. end example] The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13). |
[Note: The W3C XML Schema definition of this element’s content model (CT_SdtListItem) is located in §A.1. end note]
[ISO/IEC 29500-1 1st Edition]
listItem (Drop-Down List Item)
This element specifies a single list item within the parent drop-down list structured document tag. Each list item shall be displayed in the list displayed for the parent structured document tag (if a user interface is present).
[Example: Consider the following combo box structured document tag:
<w:sdt>
<w:sdtPr>
<w:dropDownList>
<w:listItem w:displayText="The Letter A" w:value="a"/>
<w:listItem w:displayText="The Letter B" w:value="b"/>
</w:dropDownList>
</w:sdtPr>
…</w:sdt>Each listItem element within the dropDownList element specifies a single list item entry, in this case resulting in two list items within the parent drop-down list structured document tag. end example]
Parent Elements |
|---|
dropDownList (§17.5.2.15) |
Attributes | Description |
|---|---|
displayText (List Entry Display Text) | Specifies the text to display in the run content (as well as any supplied user interface) in place of the value attribute contents for this drop-down list entry. This value shall be used as follows:
If this attribute is omitted, then the content of the value attribute shall be used as the display text for the current list item entry. [Example: Consider the following drop-down list structured document tag: <w:sdt>
<w:sdtPr>
<w:dropDownList>
<w:listItem w:displayText="The Letter A" w:value="a"/>
<w:listItem w:displayText="The Letter B" w:value="b"/>
</w:
dropDownList>
</w:sdtPr>
…</w:sdt>The displayText attribute for the first entry is The Letter A and the second is The Letter B, therefore, these values are used to determine the display text if the parent structured document tag is mapped to custom XML data in a custom XML data part. end example] The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13). |
value (List Entry Value) | Specifies the value for the current list item entry. This value shall be used as follows:
[Example: Consider the following combo box structured document tag: <w:sdt>
<w:sdtPr>
<w:comboBox>
<w:listItem w:displayText="Zero" w:value="0"/>
<w:listItem w:displayText="One" w:value="1"/>
</w:comboBox>
</w:sdtPr>
…</w:sdt>The value attribute for the first entry is 0 and the second is 1, therefore, these values are used to determine the display text if the parent structured document tag is mapped to custom XML data in a custom XML data part. end example] The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13). |
[Note: The W3C XML Schema definition of this element’s content model (CT_SdtListItem) is located in §A.1. end note]
© ISO/IEC29500: 2008.