-
Notifications
You must be signed in to change notification settings - Fork 976
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
Can't be able to use the custom CollectionEditors in NetCore projects. #11821
Comments
Sekar47
added
the
untriaged
The team needs to look at this issue in the next triage
label
Aug 6, 2024
nirzaf
added a commit
to nirzaf/winforms
that referenced
this issue
Aug 14, 2024
Fixes dotnet#11821 Add support for custom CollectionEditors in .NET Core projects. * **CollectionEditor.cs** - Add a method `GetCustomEditor` to check for custom editors. - Modify the `EditValue` method to use the custom editor if available. * **CollectionEditor.CollectionForm.cs** - Add a method `GetCustomEditor` to check for custom editors. * **CollectionEditor.FilterListBox.cs** - Add support for custom drawing of list items by handling the `WM_DRAWITEM` message. - Implement the `ListBox_drawItem` method to draw custom list items.
dotnet-policy-service
bot
added
the
🚧 work in progress
Work that is current in progress
label
Aug 14, 2024
This is not a bug, this is by design of the Out-Of-Process Designer. https://devblogs.microsoft.com/dotnet/custom-controls-for-winforms-out-of-process-designer/ |
dotnet-policy-service
bot
removed
the
untriaged
The team needs to look at this issue in the next triage
label
Sep 5, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Edition - Windows 11 Enterprise
Version - 23H2
OS build - 22631.3737
Visual Studio version - 17.10.4
.NET version
.Net 6,7,8
Did this work in a previous version of Visual Studio and/or previous .NET release?
No, it's not working in previous versions of netcore
Issue description
I am developing a .NET 6.0 WinForms application where I need to use a custom CustomCollectionEditor for a Bars property in my custom control. I have implemented the CustomCollectionEditor class inheriting from UITypeEditor. The custom editor is intended to display a modal dialog for editing the Bars collection when the Bars property is clicked in the designer.
The custom editor works correctly in a .NET Framework application. However, in the .NET 6.0 application, the custom editor is not invoked, and the standard CollectionEditor is shown instead. Here I've attached both Framework and NetCore samples for your reference.
CustomCollectionEditor-NetCoreSample.zip
CustomCollectionEditor-FramworkSample.zip
Steps to reproduce
Build the project and open the form designer.
Drag and drop the custom control onto the form.
In the properties window, click the ellipsis (...) button next to the Bars property.
Expected Behavior
The CustomCollectionEditor should be invoked, displaying a modal dialog for editing the Bars collection.
Actual Behavior
The standard CollectionEditor is displayed instead of the custom CustomCollectionEditor.
Diagnostics
No response
The text was updated successfully, but these errors were encountered: