Share via


DefaultDropDownListItemIndex Class

Default Drop-Down List Item Index.When the object is serialized out as xml, its qualified name is w:default.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.DefaultDropDownListItemIndex

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

Syntax

'Declaration
Public Class DefaultDropDownListItemIndex _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As DefaultDropDownListItemIndex
public class DefaultDropDownListItemIndex : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.16.6 default (Default Drop-Down List Item Index)

This element specifies the zero-based index of the default entry for the parent drop-down list form field. This index value is the value within the drop-down list which shall be displayed in the document story within this form field if no element is selected (i.e. the result element (§17.16.28) is omitted).

If this element is omitted, then the current drop-down list form field shall have a default value of 0 (its first entry). If the attribute value references an index value which does not exist (i.e. a negative number or a number that exceeds the number of items in the drop-down list), then this value can be ignored and the current drop-down list form field shall have a default value of 0 (its first entry).

[Example: Consider the following WordprocessingML fragment for a drop-down list form field:

<w:fldChar w:fldCharType="begin">
<w:ffData>
<w:ddList>
<w:default w:val="1" />
<w:listEntry w:val="One" />
<w:listEntry w:val="Two" />
<w:listEntry w:val="Three" />
</w:ddList>
</w:ffData>
</w:fldChar>

The default element specifies the index of the default value of the drop-down list form field to be *1.*Since the form field does not contain a result element, this is the index of the content which must be displayed when the contents of the form field are displayed by an application. In this case, the resulting default value text is Two. end example]

Parent Elements

ddList (§17.16.9)

Attributes

Description

val (Decimal Number Value)

Specifies that the contents of this attribute contains a decimal number.

The contents of this decimal number are interpreted based on the context of the parent XML element.

[Example: Consider the following numeric WordprocessingML property of simple type ST_DecimalNumber:

<… w:val="1512645511" />

The value of the val attribute is a decimal number whose value must be interpreted in the context of the parent element. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

[Note: The W3C XML Schema definition of this element’s content model (CT_DecimalNumber) 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

DefaultDropDownListItemIndex Members

DocumentFormat.OpenXml.Wordprocessing Namespace