Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Designer still does not add name property in designer.cs file for ListView ColumnHeader Types #12178

Open
Howard0101 opened this issue Sep 19, 2024 · 1 comment
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues untriaged The team needs to look at this issue in the next triage

Comments

@Howard0101
Copy link

Howard0101 commented Sep 19, 2024

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

@Howard0101 Howard0101 added the untriaged The team needs to look at this issue in the next triage label Sep 19, 2024
@merriemcgaw merriemcgaw added the area-VSDesigner Windows Forms out-of-proc designer related issues label Sep 19, 2024
@merriemcgaw
Copy link
Member

@Olina-Zhang can your team regress this and let us know if we've ever done this differently for Framework or Core versions? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues untriaged The team needs to look at this issue in the next triage
Projects
None yet
Development

No branches or pull requests

2 participants