SortDescription.PropertyName 属性
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置要用作排序条件的属性名称。
public:
property System::String ^ PropertyName { System::String ^ get(); void set(System::String ^ value); };
C#
public string PropertyName { get; set; }
member this.PropertyName : string with get, set
Public Property PropertyName As String
默认值为 null。
此属性应是基础集合中项的公共属性。
字符串由排序中涉及的特定 ICollectionView 对象解释。
BindingListCollectionView 仅支持简单列名。
ListCollectionView 支持一般属性路径 和 XPath
(对于 XML 数据)。 因此,当视图是 ListCollectionView 对象时,可以根据这些节点的属性对 中的 XmlDataProvider XML 节点进行排序。 例如,如果属性名称为 Cost
,则为 PropertyName 中的 SortDescription指定“@Cost”。
产品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |