VS Designer still does not add name property in designer.cs file for ListView ColumnHeader Types #12178
Labels
area-VSDesigner
Windows Forms out-of-proc designer related issues
Milestone
Environment
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.11.4
.NET version
NET 8
Did this work in a previous version of Visual Studio and/or previous .NET release?
I honestly do not know
Issue description
The ListView Columns IndexOfKey function ALWAYS returns -1 (=not found). Eventhough the column name is correct and set in the VS Designer.
Steps to reproduce
Using NET 8 Windows Forms and creating a Windows Form with Visual Studio Designer which contains a ListView Control listView, I added some ColumnHeaders with Name (example "aCreatedHeader") and Text (example "Header") Properties. In the code behind try to use the function listView.Columns.IndexOfKey("aCreatedHeader"). It will ALWAYS return -1 since the deisgner neglets to write the name Property in the corresponding designer.cs file.
Please reopen closed Ticket #2867 or #2869 .
Diagnostics
No response
The text was updated successfully, but these errors were encountered: