I have a GoNode class with a Hashtable instance inside. Hashtable’s keys are instances of another class, and the values are bool. I can drag and drop this GoNode from GoPalette to GoView. In GoView I can Ctrl-drag and drop to create a copy. I even tried serilization(as a method to debug copy/paste), and there is no problem. The only problem is Ctrl+C and Ctrl+V cannot create a paste. If I remove the Hashtable instance, the paste works.
I do notice in the serialized file, the Hashtable instance is put into a GoCopyDelayedsCollection tag element.
I guess the paste failuer is because during pasting it is failed to reconstruct the Hashtable instance or the internal keys or values.
All the classes involved have [Serializable] attribute and all event handlers have [field: NonSerialized] attribute.
If I do a Ctrl+C in GoView and do a Ctrl+V in Windows Paint, I do get a graph of the GoNode.
Though the paste failes, there is no exceptions thrown out, even if in Visual Studio I enable all types of exceptions to be caught.
Could you anyone give me any hint on what may be wrong or what I should do further to debug this problem?
I solved this problem. Because the Hashtable is a derived class from Hashtable. A special constructor must be declared for serialization.