<?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 Maptip Multiple Field Binding in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429497#M11071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to format city, state, and zip (separate out fields) and display them in a maptip. It's possible to create separate text blocks with bindings for each field and then put them in a horizontal stackpanel, but it seems like there should be an easier way. I tried using a converter, but the object passed to the Convert method is of type ESRI.ArcGIS.Client.Graphics.ObservableDictionary and I can't figure out how to cast it correctly to get the values out. What is the best way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2011 15:55:10 GMT</pubDate>
    <dc:creator>DanielSanders</dc:creator>
    <dc:date>2011-05-25T15:55:10Z</dc:date>
    <item>
      <title>Maptip Multiple Field Binding</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429497#M11071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to format city, state, and zip (separate out fields) and display them in a maptip. It's possible to create separate text blocks with bindings for each field and then put them in a horizontal stackpanel, but it seems like there should be an easier way. I tried using a converter, but the object passed to the Convert method is of type ESRI.ArcGIS.Client.Graphics.ObservableDictionary and I can't figure out how to cast it correctly to get the values out. What is the best way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 15:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429497#M11071</guid>
      <dc:creator>DanielSanders</dc:creator>
      <dc:date>2011-05-25T15:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Maptip Multiple Field Binding</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429498#M11072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The datacontext of the maptip is set to the Attributes property of the current graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attributes is an ObservableDictionary, so if you bind to the datacontext itself (i.e. {Binding} without path) you get the Observable dictionary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use a converter, this converter will get this dictionary as input, so you can use it to generate the string you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;By supposing your attributes are called "City" and "State":&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
public object Convert(object value, .....)
{
&amp;nbsp; ObservableDictionary dict = value as ObservableDictionary;
&amp;nbsp; return format.String("City = {0}&amp;nbsp; State =&amp;nbsp; {1}", dict["City"], dict["State"]);
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:19:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429498#M11072</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T19:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Maptip Multiple Field Binding</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429499#M11073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for you reply. This line gives an error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ObservableDictionary dict = value as ObservableDictionary;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I'm missing a reference. Do you know what assembly ObservableDictionary is in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2011 18:26:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429499#M11073</guid>
      <dc:creator>DanielSanders</dc:creator>
      <dc:date>2011-05-25T18:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Maptip Multiple Field Binding</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429500#M11074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry my mistake.&amp;nbsp; Observable Dictionary is not public:confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attributes is declared as&amp;nbsp; 'IDictionary&amp;lt;string, object&amp;gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so the code should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
public object Convert(object value, .....)
{
&amp;nbsp; var dict = value as IDictionary&amp;lt;string, object&amp;gt;;
&amp;nbsp; return format.String("City = {0}&amp;nbsp; State =&amp;nbsp; {1}", dict["City"].ToString(), dict["State"].ToString());
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the confusion.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:19:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429500#M11074</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T19:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Maptip Multiple Field Binding</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429501#M11075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Awesome. That works. Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 16:59:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/maptip-multiple-field-binding/m-p/429501#M11075</guid>
      <dc:creator>DanielSanders</dc:creator>
      <dc:date>2011-05-26T16:59:16Z</dc:date>
    </item>
  </channel>
</rss>

