Generating an image representation for a layer

2119
1
06-29-2011 01:05 PM
Labels (1)
AndreMachado
New Contributor
Hello!

With ArcGIS for Silverlight I can use the ToBitmap() method from the Layer class to generate a bitmap. So I can use the result as a thumbnail for my layer. With the WPF version I don't have this method. I can use the RenderTargetBitmap class to generate an image from the Map because it inherits from the Visual base class. But I don't want to take the whole map representation... I need one for each layer. The Layer class is not a Visual, so I can't render it as an image (at least not as easily as I can with the map).

I saw that the Layer class has a Canvas property. That's a LayerCanvas that inherits from a Panel and it should work. But the problem is: it's an internal property.

So just to sum up my problem: how to generate an image representation for a layer? Not the whole map... just one layer at time...! Should I just use reflection to access this property? Are there any other solutions?

Thank you!!

Regards,

Andre
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
We currently have this available only for Silverlight. You are right that it works on an internal property Canvas. I will forward your request to our dev lead but this is not currently supported in WPF.
0 Kudos