閱讀英文

共用方式為


enumeratedList

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

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

語法

<!-- 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 列舉
enumRange

 

屬性

屬性 描述
defaultText 公共。 自選。 如果指定值給 IPropertyDescription::FormatForDisplay 未對應至清單中的其中一個列舉專案,請指定要使用的預設文字。 語法允許直接顯示字串或間接顯示字串參考;使用 參考,使其可以當地語系化。
useValueForDefault 公共。 自選。 將此值設定為 「true」 會通知 IPropertyDescription::FormatForDisplay,如果值未對應至清單中的其中一個列舉元素,則使用值 as-is。 針對 IPropertyDescription::FormatForDisplay,將此設定為 “true” 的優先順序高於設定 “defaultText”。 預設值為 「false」。。