Description
.NET version
.Net 8.0+ private binaries built from Winforms main branch
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, this issue cannot repro in the latest .Net 8.0 RC2 build and previous versions, regressed from GH PR: #9782
Issue description
After the PR: #9782, it just works well in ListView with View mode: Details/Tile, and for other values: LargeIcon/SmallIcon/List, there has an exception unhandled when using Accessibility tools to edit ListItem
_System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null. (Parameter 'owningListView.listViewSubItem')
Source=System.Private.CoreLib
StackTrace:
at System.ArgumentNullException.Throw(String paramName)
at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
at System.Windows.Forms.ArgumentValidation.OrThrowIfNull[T](T argument, String paramName)
at System.Windows.Forms.ListViewLabelEditAccessibleObject..ctor(ListView owningListView, ListViewLabelEditNativeWindow labelEdit)
at System.Windows.Forms.ListViewLabelEditNativeWindow.get_AccessibilityObject()
at System.Windows.Forms.ListViewLabelEditNativeWindow.g__EnsureWinEventHooksInstalledAndGetAccessibilityObject|19_0()
at System.Windows.Forms.ListViewLabelEditNativeWindow.WmGetObject(Message& m)
at System.Windows.Forms.ListViewLabelEditNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
Steps to reproduce
Sampe application:
ListViewDemo.zip