enumeratedList

指定 IPropertyDescription::FormatForDisplay 如何將屬性的值格式化為字串。 如果 「editControl」 是 listblox,它也會影響屬性群組的方式,或清單中要顯示哪些值。 只有在 displayInfo displayType=「Enumerated」 > 時才 < 適用。 每個displayInfo元素應該只有一個enumeratedList元素。

如果有多個元素,則會使用最後一個專案。 如果未提供 enumeratedList 元素,則會將預設屬性設定套用至屬性描述。

Syntax

<!-- enumeratedList -->
<xs:element name="enumeratedList"  minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="enum" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="value" type="xs:string" use="required"/>
                    <xs:attribute name="text" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="enumRange" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="minValue" type="xs:integer" use="required"/>
                    <xs:attribute name="setValue" type="xs:integer"/>
                    <xs:attribute name="text" type="xs:string"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="defaultText" type="xs:string"/>
        <xs:attribute name="useValueForDefault" type="xs:boolean"/>
    </xs:complexType>
</xs:element>

項目資訊

Parent 項目 子元素
displayInfo enum
enumRange

 

屬性

屬性 Description
defaultText 公用。 選擇性。 如果指定值給 IPropertyDescription::FormatForDisplay ,但未對應至清單中的其中一個列舉專案,請指定要使用的預設文字。 語法允許直接顯示字串或間接顯示字串參考;使用 參考,以便進行當地語系化。
useValueForDefault 公用。 選擇性。 將此值設定為 「true」 會通知 IPropertyDescription::FormatForDisplay ,如果值未對應至清單中的其中一個列舉元素,則會以原狀方式使用值。 針對 IPropertyDescription::FormatForDisplay,將此設定為 「true」 優先于設定 「defaultText」。 預設值為 "false"。