<?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: How to Convert a Graphic Symbol into an ImageSource in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133841#M3356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can instantiate a &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer.html"&gt;simple renderer&lt;/A&gt; and set the &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~Symbol.html"&gt;symbol &lt;/A&gt;property to the graphic symbol.&lt;BR /&gt;&lt;BR /&gt;Then by calling &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~QueryLegendInfos.html"&gt;QueryLegendInfos &lt;/A&gt;on this renderer, you will get the &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.LegendItemInfo~ImageSource.html"&gt;imagesource &lt;/A&gt;as a property of the legendItemInfo (only one legenditeminfo is returned by a simple renderer)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much! That did the trick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Apr 2013 13:19:38 GMT</pubDate>
    <dc:creator>DonnieHolmes</dc:creator>
    <dc:date>2013-04-08T13:19:38Z</dc:date>
    <item>
      <title>How to Convert a Graphic Symbol into an ImageSource</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133839#M3354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have any sample code for converting the Symbol of a Graphic into an ImageSource (similar to what is displayed on the Legend control)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What i'm trying to do is display selected items from the map in a listbox and show the symbol used for the item next to the display name (similar to the Legend Symbol).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is fairly easy if the layer uses a single symbol, but it's not so easy in the case of a unique value renderer. I have looked into simply leveraging the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ILegendSupport~QueryLegendInfos.html" rel="nofollow" target="_blank"&gt;ILegendSupport.QueryLegendInfos&lt;/A&gt;&lt;SPAN&gt; call, but the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.LegendItemInfo_members.html" rel="nofollow" target="_blank"&gt;return data&lt;/A&gt;&lt;SPAN&gt; does not contain information that is suitable for use as a unique id (In the case of a unique value renderer, only the label and description for each symbol is exposed and not the underlying values that are used).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas are appreciated - Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2013 19:13:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133839#M3354</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2013-04-05T19:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Convert a Graphic Symbol into an ImageSource</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133840#M3355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can instantiate a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer.html" rel="nofollow" target="_blank"&gt;simple renderer&lt;/A&gt;&lt;SPAN&gt; and set the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~Symbol.html" rel="nofollow" target="_blank"&gt;symbol &lt;/A&gt;&lt;SPAN&gt;property to the graphic symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then by calling &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~QueryLegendInfos.html" rel="nofollow" target="_blank"&gt;QueryLegendInfos &lt;/A&gt;&lt;SPAN&gt;on this renderer, you will get the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.LegendItemInfo~ImageSource.html" rel="nofollow" target="_blank"&gt;imagesource &lt;/A&gt;&lt;SPAN&gt;as a property of the legendItemInfo (only one legenditeminfo is returned by a simple renderer)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 10:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133840#M3355</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-04-08T10:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Convert a Graphic Symbol into an ImageSource</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133841#M3356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can instantiate a &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer.html"&gt;simple renderer&lt;/A&gt; and set the &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~Symbol.html"&gt;symbol &lt;/A&gt;property to the graphic symbol.&lt;BR /&gt;&lt;BR /&gt;Then by calling &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.SimpleRenderer~QueryLegendInfos.html"&gt;QueryLegendInfos &lt;/A&gt;on this renderer, you will get the &lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.LegendItemInfo~ImageSource.html"&gt;imagesource &lt;/A&gt;as a property of the legendItemInfo (only one legenditeminfo is returned by a simple renderer)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much! That did the trick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 13:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133841#M3356</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2013-04-08T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Convert a Graphic Symbol into an ImageSource</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133842#M3357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Would someone mind posting some code for this?&amp;nbsp; I get a dreaded&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with the following code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sr As New SimpleRenderer With {.Symbol = CType(App.Current.Resources("AutoSymbol"), MarkerSymbol)}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Renderer instantiates fine, with a valid symbol.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr.QueryLegendInfos(AddressOf WTF, Nothing) 'Error Here

&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub WTF(d As LayerLegendInfo)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Do Something
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:29:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-convert-a-graphic-symbol-into-an/m-p/133842#M3357</guid>
      <dc:creator>LanceCrumbliss</dc:creator>
      <dc:date>2021-12-11T07:29:44Z</dc:date>
    </item>
  </channel>
</rss>

