<?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: Legend of maps in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265014#M6889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i tried your solution but it didnt work.i want when i click in the radiobutton of map1....the map1 appear..and if i want the map2..i click in the other radiobutton. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do do you mean by 'the map1 appears'? appears in the legend (with 2 maps on the screen) or just toggled on/off with only one map visible at a time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second case, you have just to create 2 maps and toggle the visibilities on/off depending on the radio button.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2012 08:44:44 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2012-05-18T08:44:44Z</dc:date>
    <item>
      <title>Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265011#M6886</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;SPAN&gt;i want to have a legend of two maps with radiobutton.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;explaining : i want to have a legend with RadioButtons..when i click on first radiobutton, i should have a map(map1), and when i clicked in the another radiobutton, i should have another map (map2).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;any help about this please !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 19:29:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265011#M6886</guid>
      <dc:creator>YassineEL_JADIDI</dc:creator>
      <dc:date>2012-05-15T19:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265012#M6887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want Legend control to switch Map through RadioButton.Click, you can use RadioButton.Tag to store the element and implement its Click event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; &amp;lt;StackPanel VerticalAlignment="Top" HorizontalAlignment="Center"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;RadioButton x:Name="Rb" Content="Test" Tag="{Binding ElementName=MyMap}" Click="RadioButton_Click"/&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;RadioButton x:Name="Rb2" Content="Test" Tag="{Binding ElementName=MyMap2}" Click="RadioButton_Click"/&amp;gt;
&amp;nbsp; &amp;lt;/StackPanel&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming you've given your Legend control a name (i.e. x:Name="MyLegend")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Code-behind&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; private void RadioButton_Click(object sender, RoutedEventArgs e)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; var rb = sender as RadioButton;
&amp;nbsp;&amp;nbsp; if (rb.IsChecked.HasValue &amp;amp;&amp;amp; rb.IsChecked.Value)
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyLegend.Map = rb.Tag as Map;
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265012#M6887</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T12:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265013#M6888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you jennifer for your replies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i tried your solution but it didnt work.i want when i click in the radiobutton of map1....the map1 appear..and if i want the map2..i click in the other radiobutton.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 08:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265013#M6888</guid>
      <dc:creator>YassineEL_JADIDI</dc:creator>
      <dc:date>2012-05-18T08:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265014#M6889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i tried your solution but it didnt work.i want when i click in the radiobutton of map1....the map1 appear..and if i want the map2..i click in the other radiobutton. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do do you mean by 'the map1 appears'? appears in the legend (with 2 maps on the screen) or just toggled on/off with only one map visible at a time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second case, you have just to create 2 maps and toggle the visibilities on/off depending on the radio button.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 08:44:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265014#M6889</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-05-18T08:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265015#M6890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i mean when i click on the radiobutton of "map1", the map1 appear ine the screen with his legend, and when i click on radiobutton of map2, the map2 appear with his legend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i wish i explained well what i want !!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 08:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265015#M6890</guid>
      <dc:creator>YassineEL_JADIDI</dc:creator>
      <dc:date>2012-05-18T08:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265016#M6891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i mean when i click on the radiobutton of "map1", the map1 appear ine the screen with his legend, and when i click on radiobutton of map2, the map2 appear with his legend.&lt;BR /&gt;i wish i explained well what i want !!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;So why not just define 2 maps and 2 legends with only one map and one legend visible at a time (radio button toggling visibility of these elements) ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 08:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265016#M6891</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-05-18T08:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265017#M6892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;how can i do that ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;how can the radiobutton click toggle the visibility of a map ?? can you help me with the code please ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 11:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265017#M6892</guid>
      <dc:creator>YassineEL_JADIDI</dc:creator>
      <dc:date>2012-05-18T11:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Legend of maps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265018#M6893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a simple example of how to do what you are asking using 2 maps and 2 Legends.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map x:Name="&lt;STRONG&gt;Map1&lt;/STRONG&gt;" Extent="-20037507.0671618,-20037507.0671618,20037507.0671618,20037507.0671619"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="basemap" DisplayName="Base Map 1" Url="http://services.arcgisonline.com/arcgis/rest/services/world_topo_map/MapServer" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="&lt;STRONG&gt;points&lt;/STRONG&gt;" DisplayName="&lt;STRONG&gt;Incident Points&lt;/STRONG&gt;" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0" DisableClientCaching="True"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map x:Name="&lt;STRONG&gt;Map2&lt;/STRONG&gt;" Extent="-20037507.0671618,-20037507.0671618,20037507.0671618,20037507.0671619" &lt;STRONG&gt;Visibility="Collapsed"&lt;/STRONG&gt;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="basemap" DisplayName="Base Map 2" Url="http://services.arcgisonline.com/arcgis/rest/services/world_topo_map/MapServer" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="&lt;STRONG&gt;lines&lt;/STRONG&gt;" DisplayName="&lt;STRONG&gt;Incident Lines&lt;/STRONG&gt;" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/1" DisableClientCaching="True"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="&lt;STRONG&gt;polygons&lt;/STRONG&gt;" DisplayName="&lt;STRONG&gt;Incident Polygons&lt;/STRONG&gt;" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2" DisableClientCaching="True"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid VerticalAlignment="Bottom" HorizontalAlignment="Right"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Legend x:Name="&lt;STRONG&gt;Legend1&lt;/STRONG&gt;" Map="{Binding ElementName=Map1}" LayerIDs="&lt;STRONG&gt;points&lt;/STRONG&gt;" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Legend x:Name="&lt;STRONG&gt;Legend2&lt;/STRONG&gt;" Map="{Binding ElementName=Map2}" LayerIDs="&lt;STRONG&gt;lines,polygons&lt;/STRONG&gt;" &lt;STRONG&gt;Visibility="Collapsed"&lt;/STRONG&gt; /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadioButton GroupName="MapSwitcher" Tag="1" Content="Display Map 1" IsChecked="True" Click="RadioButton_Click" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadioButton GroupName="MapSwitcher" Tag="2" Content="Display Map 2" IsChecked="False" Click="RadioButton_Click" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
 string tag = (sender as RadioButton).Tag as string;
 switch (tag)
 {
&amp;nbsp; case "1":
&amp;nbsp;&amp;nbsp; Map1.Visibility = Visibility.Visible;
&amp;nbsp;&amp;nbsp; Legend1.Visibility = Visibility.Visible;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map2.Visibility = Visibility.Collapsed;
&amp;nbsp;&amp;nbsp; Legend2.Visibility = Visibility.Collapsed;
&amp;nbsp;&amp;nbsp; break;
&amp;nbsp; case "2":
&amp;nbsp;&amp;nbsp; Map2.Visibility = Visibility.Visible;
&amp;nbsp;&amp;nbsp; Legend2.Visibility = Visibility.Visible;
&amp;nbsp;&amp;nbsp; Map1.Visibility = Visibility.Collapsed;
&amp;nbsp;&amp;nbsp; Legend1.Visibility = Visibility.Collapsed;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp; }&amp;nbsp;&amp;nbsp; 
 }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should give you the functionality you are looking for and you can then change it to meet your needs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:58:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-of-maps/m-p/265018#M6893</guid>
      <dc:creator>ChristopherHill</dc:creator>
      <dc:date>2021-12-11T12:58:20Z</dc:date>
    </item>
  </channel>
</rss>

