I am creating a fairly generic diagram control. That my client would like to use for different types of diagrams. I have created a DiagramBlock which inherits from GoTextNode, the idea is developers will inherit from that object to create their own specific node types.
I am trying to write some generic code to Save and Load the diagram create. When I save the diagram it looks like this
When I load it it looks like this
The definition of what the node should look like is in the class defined by a developer.
In my TransformNode class I have coded the GenerateAttributes ad ConsumeAttributes to set the position and size and label. Do I have to also save and reload the background and colour etc?
That depends on whether you want that particular information to be specified in the XML file, or whether it should be the responsibility of the node class, or some combination of both.
Are you sure the proper node class is being instantiated?