How to print a map with .net runtime 100.2

2204
12
01-11-2018 06:49 AM
Jean-ChristopheBertolini
New Contributor III

Hi,

I am using .ArcGIS Runtime for .Net v100.2 in a WPF app and I would like to have a function to print the map. I can't found any code samples in the documentation or in the guide. How to do this ? Could you provide exemple or link to demonstrate this ?

Thanks!

jcb 

0 Kudos
12 Replies
Jean-ChristopheBertolini
New Contributor III

Hi,

I confirm the analyze of Waldemar. In the runtime 100.3 code like this : 

                PrintDialog printDialog = new PrintDialog();
                if (printDialog.ShowDialog() == true)
                {
                    printDialog.PrintVisual(mapView, "Carte Poseis");
                }

don't work (print an empty image) but it was okay in the previous version!

It will be great to have a Print function on the map to avoid this kind of regression.

Regards

jcb

0 Kudos
dotMorten_esri
Esri Frequent Contributor

This is most likely due to a performance improvement in the rendering pipeline where the map is rendered on a separate UI Thread, and your print function isn't able to "see" that.

Instead use the mapView.ExportImageAsync() to get a bitmap of the map to print.

0 Kudos
dotMorten_esri
Esri Frequent Contributor

Is there another method to print high resolution bitmap in 100.3

At this time no. The map only renders at the resolution of your device. High-quality printing is in our backlog, and mostly a Pro/ArcMap thing at the moment.

0 Kudos