dotnet/winforms

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

Ouverte

#6 612 ouverte le 3 févr. 2022

 (2 commentaires) (0 réaction) (0 personne assignée)C# (922 forks)batch import
area-controls-ListViewhelp wanted

Métriques du dépôt

Stars
 (4 100 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

.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)

Guide contributeur