dotnet/winforms

ListViewItem does not reset its "Selected" flag after removing from ListView

Open

#6,612 建立於 2022年2月3日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)C# (922 fork)batch import
area-controls-ListViewhelp wanted

倉庫指標

Star
 (4,100 star)
PR 合併指標
 (平均合併 14天 22小時) (30 天內合併 56 個 PR)

描述

.NET Core Version:

  • 7.0.0-preview.2.22102.1

Have you experienced this same bug with .NET Framework?:

  • Yes

Problem description:

  1. Create a Form with a ListView
  2. Add several ListViewItems
  3. Add an event to remove an ListViewItem when the key is pressed
  4. Add a MessageBox with the status of the ListViewItem after deletion to the event above
  5. Run the application
  6. Set focus to an ListViewItem
  7. Delete an ListViewItem by pressing the key

Actual behavior: The ListViewItem.Selected have the value True image

Expected behavior: The ListViewItem.Selected should have the value False (according to TreeView behavior)

貢獻者指南