Hello,
I would like to print the xamNetworkNode. I do not want to use PrintVisual. Is there anyway i could create a flow document and print that?
Thanks
Rohit
Hi Prasad,
That is a lot of nodes and they definitely will not fit on one page. Unfortunately, like I said previously, the XamNetworkNode control does not have something like pagination implemented so it won't automatically know that it has to render onto a different page.
The only thing I can suggest is to maybe try breaking down the node map into smaller sections and then rendering each section to an image. You can then add the image to it's own page in the FlowDocument. I think for this you will need to create a custom paginator that will let you control what visuals go into each page. You can break up the node map into smaller sections by adjusting the WindowRect property. The WorldRect property is a rectangle that defines the entire area occupied by the node map. The WindowRect property designates what portion of the WorldRect is visible. So if you size the WindowRect appropriately you can programmatically move it around and render out an image of what the control sees.
Hi,
This will work out for smaller maps of <50 nodes but if we have a map of >500 nodes, then the scale to fit and print will not give any details of the nodes in the map, at least the labels on the node are not visible. A map of >500 nodes if scaled to fit, the nodes will appear as tiny small shapes with out any details as attached in the sample snapshot. So is there any other possibility that we can print the parts of the map into different pages setting zoom level to 100% ?
Thanks,
Prasad
If you are zooming in and then trying to print the whole network node, that isn't really going to work. You would have to increase the width and height of the XamNetworkNode control so that when you print it, it uses that size. Then you run into the issue where it may not fully fit on one page. There is no pagination with this control so it will try to render the whole thing on one page. If the control is made too big then it will be cutoff when you print it.
About the only thing I can suggest is that you set the Width and Height to the size you want it and then call ScaleToFit(). This will scale the nodes so they are all in view. Once they are all in view you can try printing it.
Thank you for the print sample.
I am able to print only the visible portion of the map.
How can we print the complete map? I mean the whole network map even if the nodes are not in view.
Hi Rohit,
Let me know if you have any further questions regarding this matter.