Select to view content in your preferred language

How to Set an SIlverlight ImageServiceLayer cell value to transparent

2022
1
11-14-2013 10:35 AM
NickHarrison
New Contributor III
I've got an ArcGISImageServiceLayer in my Silverlight application.

The service has some NULL cells and some cells with 255,255,255. Both need to be transparent.

I can set the NULL cells transparent by using the NoData property.
http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?esri.arcgis.client~esri.arc...


How can I set the 255,255,255 cells to transparent?


In ArcGIS desktop I can do this by setting the "Display Backgroud Value (R,G,B) to transparent.
I don't see an obvious way to do this in the Silverlight API.

Thanks,
0 Kudos
1 Reply
JohanCarlsson
Occasional Contributor
Have you tried changing the image format of your layer? Might be that the format you are currently using does not support transparency. If you set it to png, your problem might solve itself.

(layer as ArcGISImageServiceLayer).ImageFormat = ArcGISImageServiceLayer.ImageServiceImageFormat.Default;

ImageFormat documentation.
0 Kudos