共用方式為


stringFormat

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

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

語法

<!-- 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 沒有

 

屬性

屬性 描述
formatAs 公共。 自選。 預設值為 「General」。 以下是有效的值。
價值 意義
常規 違約。 以未格式化的字串形式傳回值。
檔名 將值格式化為檔名。 根據使用者設定隱藏延伸模組。 需要屬性類型為 String。
FilePath 將值格式化為檔案路徑。 根據使用者設定隱藏延伸模組。 需要屬性類型為 String。
超連結 將值格式化為超連結。