Check out How to Edit and Persist Collections with CollectionEditor
By Daniel Zaharia, The article demonstrates how to edit and persist collections with CollectionEditor. http://www.codeproject.com/KB/cs/dzcollectioneditor.aspx. I found it a good resource. Another good example is Create a PanelManager at http://dotnetrix.co.uk/custom.htm.
I have had no problem using the CollectionEditor
. It is fairly straight forward. I did have trouble at first with the ExpandableObjectConverter
that I created because I didn't understand it purpose. The MSDN Library is a good source for this. For another reference and actual example of "How to: Implement a Type Converter", see MSDN: http://msdn.microsoft.com/en-us/library/ayybcxe5.aspx.
Why do you want to know the "internal workings"? What is your specific trouble? Is your trouble with the editor or the type converter? You can download Microsoft's source code for the .NET Framework or inspect the CollectionEditor using .NET Reflector. When I reviewed the code, it really didn't help me.
From my limited understanding, the CollectionEditor
uses the TypeConverter
to create the constructor code used in the designer-generated form code.
Regarding your NullReference, debugging design-time controls will find your problem. See Walkthrough: Debugging Custom Windows Forms Controls at Design Time at http://msdn.microsoft.com/en-us/library/5ytx0z24(VS.80).aspx.