Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Default CollectionEditor Appears instead of the Custom CollectionEditor When the Editor Opens from the UITypeEditor’s Custom Form #13355

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

Open
SreemonPremkumarMuthukrishnan opened this issue Apr 23, 2025 · 3 comments
Labels
area-VSDesigner Windows Forms out-of-proc designer related issues

Comments

@SreemonPremkumarMuthukrishnan

Environment

Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.13.6

.NET version

Facing this issue in both .NET80 and .NET90.

Did this work in a previous version of Visual Studio and/or previous .NET release?

No response

Issue description

A custom CollectionEditor does not appear as expected when invoked from a custom form of a UITypeEditor. Instead, the default CollectionEditor is displayed, which prevents the intended custom editing functionality from being used.

If the CollectionEditor property is directly on the control's class, the custom CollectionEditor appears as expected. However, in our scenario, we are showing this property inside the property grid within the custom form of the UITypeEditor.

We would appreciate any guidance or suggestions on resolving this issue to display the custom CollectionEditor.

In the sample, the MyCollection property is bound with the UITypeEditor, which shows a custom form, and the SubItems property is bound with the Custom CollectionEditor.

Demo link:

CustomControlLibrary_WithSample.zip

NuGet is included in the above file.

Issue replication video:

CollectionEditor_Output.mp4

Steps to reproduce

  1. Open the Designer.
  2. Click the CustomControl and go to the property window.
  3. Now, open the custom form of the "MyCollection" property.
  4. Press the "Add" button.
  5. Open the editor of the "SubItems" property inside the custom form's property grid.

Expected Behavior - The custom Collection Editor should be shown.
Observed Behavior - The default Collection Editor was shown.

Note: The same "SubItems" property is directly available on the custom control, and it displays the custom CollectionEditor properly.

Diagnostics


@SreemonPremkumarMuthukrishnan SreemonPremkumarMuthukrishnan added the untriaged The team needs to look at this issue in the next triage label Apr 23, 2025
@Tanya-Solyanik Tanya-Solyanik added area-VSDesigner Windows Forms out-of-proc designer related issues and removed area-DesignerSupport labels Apr 29, 2025
@SreemonPremkumarMuthukrishnan
Copy link
Author

Hi team

Is there any updated regarding this?

Regards,
Sreemon Premkumar M.

@merriemcgaw
Copy link
Member

Please take a look at this blog to find more information about building for the out-of-process designer. There are links to code samples and examples that should help you solve your issues here.

@merriemcgaw merriemcgaw added waiting-author-feedback The team requires more information from the author and removed untriaged The team needs to look at this issue in the next triage labels May 5, 2025
@KlausLoeffelmann
Copy link
Member

I can take a look sometime next week at the earliest.

In the meantime - try to attach a second instance of Visual Studio, to debug into the Editor client-side/server-side at Design Time. Your general approach seems to be fine.

Please note, that if you want to debug into the Server process, that you need to attach both the Visual Studio instance running the WinForms OOP Designer AND the DesignToolsServer, so breakpoints would be hit on both sides.

If that causes problems, use the "Wooden-Mallet-Method":
Use Debugger.Launch(), if Debugger.IsAttached returns false at the spots, where you want to see, where things are not getting picked up:

  if (!Debugger.IsAttached)
  {
      Debugger.Launch();
  }

@KlausLoeffelmann KlausLoeffelmann removed the waiting-author-feedback The team requires more information from the author label May 7, 2025
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
Projects
None yet
Development

No branches or pull requests

4 participants