Hi,
I have a simple diagram layout with two nodes, and an arrow between the nodes.
When I print the diagram using DocumentPaginator everything is fine.
However, if I save the diagram to XML and then reload it to a new diagram object prior to printing the diagram, the arrows move to a different position.
The code I am using to save/load to xml is as follows;
XmlDocument xmlDoc = new XmlDocument();
diagram.SaveToXml(xmlDoc);
Diagram copyDiagram = new Diagram();
copyDiagram.LoadFromXml(xmlDoc);
The code I am using to preview the diagram is as follows;
MemoryStream ms = new MemoryStream();
Package pkg = Package.Open(ms, FileMode.Create, FileAccess.ReadWrite);
string pack = "pack://temp.xps";
PackageStore.AddPackage(new Uri(pack), pkg);
XpsDocument doc = new XpsDocument(pkg, CompressionOption.NotCompressed, pack);
XpsSerializationManager rsm = new XpsSerializationManager(new XpsPackagingPolicy(doc), false);
rsm.SaveAsXaml(m_Diagram.DocumentPaginator);
docViewer.Document = doc.GetFixedDocumentSequence(); ;
Am I doing something wrong?
Thanks in advance
Matt