Saving a GoImage Object

Hi Walter,
I have a problem when i want to save go images.
When i load my node i get a null value goImage member.
In order to save my Document i use the following method:
public void Save(FileStream File)
{
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(File,this.Document);
}

I have inherited from GoBoxNode and now i have a goBoxNode That Contains a GoImage in its body.
i should mention that:

  1. i am a using 2.2.2.1 GoDiagram version (can’t upgrade now).
  2. I initialize the go image through the Image property (and not through the name property): goImage.Image = value
    Appreciate the help
    Aviram

Images (and ResourceManagers) are not serialized. In fact, System.Drawing.Image inherits from MarshalByRefObject.
If you really want to include the image data in your serialized document (remember, we do not recommend using serialization for persistence!), you could subclass GoImage and add a field (or more) that includes the data that you want. Also override LoadImage to reconstruct the Image from your data.

Thanks