<?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 GraphicsLayer for selected Feature in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462401#M11905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a ComboBox which shows the Names of some Features in my Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now i would like to higlight the selected Feature with a red dot, so i need to add a graphics layer to it right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My Question is, how can i get the Feature to add it to the GraphicsLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the FindTask or QueryTask the only way? Can't i just say something like GraphicsLayer.Graphics.add(FeatureID)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 12:11:11 GMT</pubDate>
    <dc:creator>UlfGrimhardt</dc:creator>
    <dc:date>2010-08-11T12:11:11Z</dc:date>
    <item>
      <title>GraphicsLayer for selected Feature</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462401#M11905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a ComboBox which shows the Names of some Features in my Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now i would like to higlight the selected Feature with a red dot, so i need to add a graphics layer to it right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My Question is, how can i get the Feature to add it to the GraphicsLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the FindTask or QueryTask the only way? Can't i just say something like GraphicsLayer.Graphics.add(FeatureID)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 12:11:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462401#M11905</guid>
      <dc:creator>UlfGrimhardt</dc:creator>
      <dc:date>2010-08-11T12:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer for selected Feature</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462402#M11906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think it would be easiest if your ComboBox ItemSource is bound to the FeatureLayer's graphics, that way when a feature name is selected, you can get the graphic from ComboBox selection and add it to a GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ComboBox ItemSource={Binding ElementName=MyMap, Path=Layers[FeatureLayerID].Graphics &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ComboBox.ItemTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;DataTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;TextBox Text={Binding Attributes[Name]&amp;gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Subscribe to the ComboBox SelectionChanged event and add this graphic to your GraphicsLayer. Your GraphicsLayer can be defined with a SimpleRenderer that has SimpleMarkerSymbol (Circle, Red) so you would only need to add graphic in code without worrying about its symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jennifer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 13:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462402#M11906</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-08-11T13:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer for selected Feature</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462403#M11907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check this sample out, it uses a mouse over events for the data rows in a grid and also the graphics in a feature layer to highlight a feature and its data row. &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SpatialQuery"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#SpatialQuery&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 16:13:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462403#M11907</guid>
      <dc:creator>TonyBacon</dc:creator>
      <dc:date>2010-08-11T16:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer for selected Feature</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462404#M11908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your replies!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ComboBox Grid.ColumnSpan="2" Margin="4,6" Name="ms_detail_combo" Grid.Column="2" Grid.Row="1" ItemsSource="{Binding ElementName=map, Path=Layers.[0].Graphics}" IsEnabled="False"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ComboBox.ItemTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;DataTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;TextBox Text="{Binding [Messstelle]}"&amp;gt;&amp;lt;/TextBox&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/DataTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/ComboBox.ItemTemplate&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/ComboBox&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But my ComboBox doesnt show any Items. I think the Path of my ItemSource is wrong, but iam not quiet sure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a MXD with two Features, and i want to show the Attributes of the first Feature. So my ArcGISDynamicMapServiceLayer is the only Layer i got, but dont i have to set the Sublayer (My first Feature that has Attriubute Messsstelle) as ItemSource? How can i do that in XAML?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 06:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462404#M11908</guid>
      <dc:creator>UlfGrimhardt</dc:creator>
      <dc:date>2010-08-12T06:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer for selected Feature</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462405#M11909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since you are using ArcGISDynamicMapServiceLayer, it's Layers will be loaded after it has been initialized. So you need to set your ComboBox ItemSource property in code-behind inside your Intialized eventhandler.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 03:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-for-selected-feature/m-p/462405#M11909</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-08-13T03:01:09Z</dc:date>
    </item>
  </channel>
</rss>

