Select to view content in your preferred language

RenderTargetBitmap not working in Runtime .NET 100.3

07-10-2018 08:47 AM
New Contributor III

In previous versions (100.1, 100.2), the following code would put a copy of the displayed map image on the Clipboard:

var bv = _mapView;

RenderTargetBitmap rtb = new RenderTargetBitmap((int)bv.ActualWidth, (int)bv.ActualHeight, 96, 96, System.Windows.Media.PixelFormats.Pbgra32);

Now, however, the map portion is rendered as black (although the credits line at the bottom "Esri, HERE, NGA, USGS" still shows).

Is there a way to get this to work?

0 Kudos
1 Reply
Esri Notable Contributor

We made a change that significantly improves rendering performance in 100.3 by rendering the map on it's own and separate UI thread, but unfortunately thar also means the above API no longer "sees" what the map renders. Since we saw a huge performance on several scenarios and devices, we felt it was worth the perf improvement as you can still use the ExportImage method on the mapview to grab a screenshot.

Please let me know if that doesn't work for you and I might be able to suggest another route