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
Hi, I need help on the below..
I am looking for this specific functionality in XamDiagram on data binding
1. Automatic layout with nodes aligned on the same level without being overlapped
2. Content fits in the node with out any cut off
3. Export to an Image
Thanks,
Raghu
Hi Andrew, I tried the TreeDiagramLayout and nodes are still being overlapped
Hello Raghu,
Would it be possible for you to provide some more detail regarding your XamDiagram? The tree layout should not overlap any nodes in the XamDiagram. Also, could you please provide the specific version of Infragistics for WPF 14.2 that you are using?
In the meantime, I will be doing some research to see if there is a way to export the XamDiagram to an Image without having to zoom out and then export.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
I have created a sample project to demonstrate both the Tree Layout and the export to image of content that is off-screen. To export the off-screen content to an Image, I would recommend calling Measure and Arrange on the containing element of the XamDiagram as well as the diagram itself. In the case of my project, that containing element is a Grid.
Then, using a new RenderTargetBitmap object, I render the containing element and then using a PngBitmapEncoder, I export the grid to a .png file. Then, I set the LayoutRoot height and width back to what it was before so that no visual changes are made to the user.
The sample project is attached.
Hi Andrew,
Thanks for the printing sample. It was a great help.
Are there any samples for using the persistence framework with xamDiagram? I built one with the 14.1 CTP which persisted as i expected but then i could not reload shapes when i converted the same code using the 16.1 "released" versions - i just received a blank diagram
Hello BeethovenCS,
I apologize for the delay in my response.
It appears that you have since created a support case for this issue (CAS-178061-R4T8S7), and this issue was found to be a bug in the XamDiagram control. It appears that another support agent, Noriko has since provided you with a private build that will hopefully fix this issue that you are referring to.
To any others who may see this post, this persistence issue has been fixed internally in the 2016.1 and 2016.2 version of the XamDiagram. The fix is not yet public, but should become public in the next service release for WPF. An estimate for when the next service release should come out can be found here: http://es.infragistics.com/support/service-releases.
Sincerely,AndrewAssociate Developer