Export to image

Developer
Jul 14, 2011 at 4:19 PM
Edited Jul 14, 2011 at 4:20 PM

When exporting to image using

Crainiate.Diagramming.Forms.FormsDocument _fd = new FormsDocument ( diagram1.Model );
_fd.Export ( Application.StartupPath + @"\teste.jpg", ExportFormat.Jpeg );

you get an error saying that the key already exists.

To solve this you have to change the method LoadDomainTypes, in the CustomBinder.cs in the folder Crainiate.Diagramming\CrainiateDiagrammin.Serialization. Replace what's inside the last foreach with:

 if ( !typeList.ContainsKey ( type.FullName ) )
 {
	 typeList.Add ( type.FullName, type );
 }