microsoft / winforms-designer-extensibility

MIT License
56 stars 13 forks source link

Some questions about porting collections editors #6

Closed kirsan31 closed 1 year ago

kirsan31 commented 1 year ago

All text down here are not actual. I've got that I need connect Microsoft.DotNet.DesignTools.Client.Editors.CollectionEditor with Microsoft.DotNet.DesignTools.Editors.CollectionEditor some how... I will update or close this later...


First of all if the editor inherited from System.ComponentModel.Design.CollectionEditor then designer not work at all - no elements in the editor. There is a connection between the client and the server - in the debugger I can see that editor instances are created, but they are always empty. I think it's because the old CollectionEditor doesn't know anything about the proxy object (which is passed as a type to the constructor) - am I right? If I change System.ComponentModel.Design.CollectionEditor with Microsoft.DotNet.DesignTools.Client.Editors.CollectionEditor (with some modifications of course) - the items will appear.

So, because I have no choice, I continue with Microsoft.DotNet.DesignTools.Client.Editors.CollectionEditor...

And here we have plenty of questions...

In old (System.ComponentModel.Design.CollectionEditor) we have this methods (which are not in the new):


Collection editor sample here: https://github.com/KlausLoeffelmann/NetControlDesigners/tree/main/src/Samples/Previous%20Versions/Sophisticated%20-%20CollectionEditor again is over complicated :( And based on my experience with the rest of the editors, I think there must be a way to solve problems above without such complications. And if not, then we definitely need away to do it :)

kirsan31 commented 1 year ago

Yes, all become clear now.