<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Changing the opacity of sublayers using the legend control in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-the-opacity-of-sublayers-using-the-legend/m-p/481433#M12421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is currently not supported by the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you look at the following SDK samples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Opacity affects the layer (not sub layer, this is why it works on FeatureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Visibility, however can be set on sub layers (if you choose to continue using ArcGISDynamicMapServiceLayer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the ArcGISDynamicMapServiceLayer.Layers are represented as FeatureLayer, you will have control over Opacity but there are trade-offs in choosing one layer type over the other. The following document might help you decide: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2011 23:07:30 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2011-05-31T23:07:30Z</dc:date>
    <item>
      <title>Changing the opacity of sublayers using the legend control</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-the-opacity-of-sublayers-using-the-legend/m-p/481432#M12420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using silverlight api 2.1/ags server 10 and I want to have opacity sliders for the sublayers of my ArcGISDynamicMapServiceLayer . &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've seen related threads like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/20264-set-opacity-of-sub-layer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/20264-set-opacity-of-sub-layer&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/4757-Opacity-for-sublayers" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/4757-Opacity-for-sublayers&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;saying it's impossible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However in your example here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;there is basically a workaround of referencing all of the sublayers like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:FeatureLayer ID="Points of Interest" 
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0" /&amp;gt;
&amp;lt;esri:FeatureLayer ID="SubLayer2" 
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/1" /&amp;gt;
&amp;lt;esri:FeatureLayer ID="SubLayer3" 
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/2" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after that, we can change the LayerIDs property and have it working with opacity sliders.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is referencing a FeatureLayer that different from referencing an ArcGISDynamicMapServiceLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you think that this workaround is fine?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you suggest other workarounds: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anything from other silverlight workarounds, to server object configuration, and even the underlying mxd. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As server side workarounds I don't mean having opacity sliders, but not having of all my layers with opacity 1 - this is my biggest issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:14:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-the-opacity-of-sublayers-using-the-legend/m-p/481432#M12420</guid>
      <dc:creator>NANA</dc:creator>
      <dc:date>2021-12-11T21:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the opacity of sublayers using the legend control</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-the-opacity-of-sublayers-using-the-legend/m-p/481433#M12421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is currently not supported by the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you look at the following SDK samples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Opacity affects the layer (not sub layer, this is why it works on FeatureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Visibility, however can be set on sub layers (if you choose to continue using ArcGISDynamicMapServiceLayer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the ArcGISDynamicMapServiceLayer.Layers are represented as FeatureLayer, you will have control over Opacity but there are trade-offs in choosing one layer type over the other. The following document might help you decide: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 23:07:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-the-opacity-of-sublayers-using-the-legend/m-p/481433#M12421</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-05-31T23:07:30Z</dc:date>
    </item>
  </channel>
</rss>

