How can I unselect item in ListView?

后端 未结 8 1158
故里飘歌
故里飘歌 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:34

    Another effective way to approach this would be:

    foreach (ListViewItem i in myListView.SelectedItems)
    {
        i.Selected = false;
    }
    

提交回复
热议问题