Is there a save method or functionality built into the diagram?
Also, is there a way to export the diagram as an image or pdf file?
Hello Ken,
Thank you for your post.
Currently, the XamDiagram does not have a built-in way of saving and loading the diagram. There is, however, a framework built into the Infragistics WPF product that can be used to save and load the current state of WPF controls in general. I would recommend you to this link in our online documentation referring to our Control Persistence Framework: http://help.infragistics.com/doc/WPF/2014.2/CLR4.0/?page=Control_Persistence_Framework.html.
Regarding the XamDiagram export, one thing you could do is create an image out of the XamDiagram and print that image for the time being. A built in ability to print the diagram is currently under review as a new product idea for the XamDiagram. If you would also like to see this functionality implemented, I would recommend voting for this particular product idea. Our product idea site is http://ideas.infragistics.com. For your convenience, this particular idea’s link is below:
Print XamDiagram: http://ideas.infragistics.com/forums/192363-wpf/suggestions/6572014-xamdiagram-ability-to-print-the-diagram.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewDeveloper Support Engineer IInfragistics Inc.www.infragistics.com/support
Just checking in, did you have any other questions or concerns on this matter?
Thank you for your response.
I understand your concerns regarding the XamDiagram and a built-in save or load functionality, but this is where the Infragistics Persistence Framework comes into play. It is meant as a unified API that can be used to save or load the layout or current state of WPF controls.
If you would like to see a built-in save or load functionality possibly implemented to the XamDiagram control, I would recommend placing a new product idea at http://ideas.infragistics.com.
I am developing a save routine as you suggested. For our implementation of the diagram, we can work around some of the limitations of the control because our diagrams are generated from objects that we already have in place. The diagram is simply our presentation of them (now).
But, I think that saving and loading a diagram would be a fundamental "feature" of a component that has all the design surface features for creating and editing a workflow diagram. In my opinion, it doesn't make sense to allow someone the capability of editing the diagram and not have the ability to save it and then load it again. Persisting the control "may" be a solution, but, I think the ability to serialize the DiagramItems and save that collection would be the best way to implement save and load methods.
Thank you for responding to my questions.