How can I unselect item in ListView?

后端 未结 8 1217
故里飘歌
故里飘歌 2021-01-08 01:19

I have a ListView with a couple of items in it. When the ListView looses focus, the last selected ListViewItem is still \"selected\" with a gray background.
I would like

8条回答
  •  忘掉有多难
    2021-01-08 01:38

    if (listView1.SelectedItems.Count > 0)
        for (int i = 0; i < listView1.SelectedItems.Count; i++)
        {
            listView1.SelectedItems[i].Selected = false;
        }
    

提交回复
热议问题