Essential Diagram for Windows Forms provides extensible support for serialization, which is the process of reading and writing a collection of objects to and from an I/O stream. Essential Diagram uses the .NET serialization framework provided by the System.Runtime.Serialization namespace.
Serialization and de-serialization can be easily performed on diagram (.edd) files and symbol palette (.edp) files.
The Diagram class contains methods for loading and saving files in two of the formats that are supported by the .NET serialization framework.
The LoadBinary and SaveBinary methods serialize diagrams symbol palettes to files and I/O streams in a binary format.
The LoadSOAP and SaveSOAP methods use the SOAP XML format to serialize diagrams and symbol palettes to files and I/O streams.
c#
case "SaveBinary": this.diagram1.SaveBinary(path + @"\Test.edd"); break; case "LoadBinary": if(File.Exists(path + @"\Test.edd")) this.diagram1.LoadBinary(path + @"\Test.edd"); break; case "SaveSoap": this.diagram1.SaveSoap(path + @"\Test.xml"); break; case "LoadSoap": if (File.Exists(path + @"\Test.xml")) this.diagram1.LoadSoap(path + @"\Test.xml"); break;
Diagram Serialized to SOAP Format