stringFormat

指定 IPropertyDescription::FormatForDisplay 如何將屬性的值格式化為字串。 只有在 displayInfo displayType=「String」 > 時才 < 適用。 每個displayInfo元素應該只有一個stringFormat元素。

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

Syntax

<!-- stringFormat -->
<xs:element name="stringFormat"  minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:attribute name="formatAs">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="General"/>
                    <xs:enumeration value="FileName"/>
                    <xs:enumeration value="FilePath"/>
                    <xs:enumeration value="Hyperlink"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
</xs:element>

項目資訊

Parent 項目 子元素
displayInfo

 

屬性

屬性 Description
formatAs 公用。 選擇性。 預設值為 「General」。 以下是有效的值。
意義
一般 預設值。 傳回值做為未格式化的字串。
FileName 將值格式化為檔案名。 根據使用者設定隱藏延伸模組。 需要屬性類型為 String。
FilePath 將值格式化為檔案路徑。 根據使用者設定隱藏延伸模組。 需要屬性類型為 String。
Hyperlink 將值格式化為超連結。