CollectionEditor Serialization
-
I have made a custom TabControl derived from Panel, custom TabPage derived form Panel, and TabPageCollection dervived from CollectionBase class. The CollectionEditor will successfully serialize the custom TabPages that are added. However when the custom TabControl is removed/deleted from a form the custom TabPage code that was added by the CollectionEditor is not removed from the forms InitalizeComponent(). When the CollectionEditor Remove button is used the serialized code is removed from InitializeCompnent() so I don't understand why it would not be removed when the custom TabControl is deleted. I also found out that if the custom TabPage does not derive from anything then the code will be removed when the control is deleted. So this is my situation, I am very confused and have asked this question on several forums with not effective responses. Do I need to implement some type of TypeConverter or override some method that is derived from a WindowsForm control? Any help or lead way will be greatly appreciated! I have been having no luck for the past week. :sigh: Thank you very much for any help. :)