labelInfo

指定属性的标签的显示方式。 每个 propertyDescription 元素应只有一个 labelInfo 元素。

如果有多个元素,则使用最后一个元素。 如果未提供 labelInfo 元素,则不会显示该属性的标签;但是,这通常是一个缺陷。

语法

<!-- labelInfo -->
<xs:element name="labelInfo">
    <xs:complexType>
        <xs:attribute name="label" type="xs:string"/>
        <xs:attribute name="sortDescription">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="General"/>
                    <xs:enumeration value="AToZ"/>
                    <xs:enumeration value="LowestHighest"/>
                    <xs:enumeration value="OldestNewest"/>
                    <xs:enumeration value="SmallestLargest"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="invitationText" type="xs:string"/>
        <xs:attribute name="hideLabel" type="xs:boolean" default="false"/>
    </xs:complexType>
</xs:element>

元素信息

Parent 元素 子元素
propertyDescription 没有

 

属性

属性 描述
标签 公共。 自选。 UI 中显示的标签(例如详细信息列标签或预览窗格)。 语法允许直接显示字符串或间接显示字符串引用。 使用间接显示字符串,因为它可以本地化。 IPropertyDescription::GetDisplayName 返回解析的显示名称。
sortDescription 自选。 指定作为排序选项提供的字符串。 IPropertyDescription::GetSortDescription 返回此排序说明。 以下值提供相应的 UI 字符串。
  • 常规:“向上排序”/“排序向下排序”
  • AToZ: “A on top” / “Z on top”
  • LowestHighest: “Top 最低” / “topest on top”
  • OldestNewest: “topest” / “newest on top”
  • SmallestLargest:“topest”/“Top 最大”
invitationText 自选。 显示为控件或工具提示(例如,“输入作者名称”)的用户的帮助字符串文本。 语法允许直接显示字符串或间接显示字符串引用。 使用间接显示字符串,因为它可以本地化。 IPropertyDescription::GetEditInvitation 返回解析的邀请文本。
hideLabel 自选。 默认值为“false”。 指示标签是否隐藏。