-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Selected API validate if the ListVIew is in virtual mode and throws an InvalidOperationException.
Selected API validate if the ListVIew
is in virtual mode and throws an InvalidOperationException
where previously a InvalidOperationException
could be thrown, if the APIs were invoked for the ListView
in virtual mode and with the created Handle
.
The new InvalidOperationException
is more obvious to developers. In addition, it closes a workaround where the developer could add a ListViewGroup
to the ListView
before the Handle
was created.
Old behavior
The listed API would throw InvalidOperationException
if invoked for ListView
is in virtual mode and with the created Handle
.
New behavior
The listed API would throw InvalidOperationException
if invoked for ListView
is in virtual mode.
Reason for change
Remove the workaround that allowed a developer to add a ListViewGroup
to a ListView
in virtual mode. Make the InvalidOperationException
more understandable for the developer.
Recommended action
- Review and, if necessary, update the code to prevent the
ListViewGroup
from being added to theListView
in virtual mode in the listed API. - If the code is handling
ArgumentNullException
replace (or supplement) it with handlingArgumentNullException
with more friendly message.
Category
- Windows Forms
Version introduced: .NET 6.0 RC2 + 7.0 Preview1
Affected APIs