简体   繁体   English

是由ListViewItem的索引引起的ListView.Items顺序?

[英]is ListView.Items order caused by Index of ListViewItem?

I have several ListViewItems i want to order it in different way using its Index . 我有几个ListViewItems我想使用其Index以不同的方式对其进行排序。 Is it possible that when i change index of item and the item location in ListView will be affected ? 当我更改项目索引时, ListView的项目位置是否会受到影响?

You cannot use ListViewItem.Index Property to order items (besides, its read-only). 您不能使用ListViewItem.Index Property对项目进行排序(此外,它是只读的)。 Instead use the ListView.Sort Method . 而是使用ListView.Sort方法

EDIT: For WPF , see http://bea.stollnitz.com/blog/?p=24 编辑:对于WPF ,请参见http://bea.stollnitz.com/blog/?p=24

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM