<?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: GeoRSSLayer capture collection changed in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159946#M4001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I figured out my Zooming issue works if I listen for the FullExtent property to change, not the Graphics. I was afraid this code would result in an infinite loop (I thought ZoomTo changes the FullExtent property of the map control) but it apparently doesn't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; rssLayer.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(rssLayer_PropertyChanged);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;void rssLayer_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.PropertyName == "FullExtent") &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map1.ZoomTo(rssLayer.FullExtent); &amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this won't result in other problems zooming in every time the full extent property changes. If I just listen for Graphics to change, then the ZoomTo method does not work. Probably because the Graphics layer hasn't updated its layout at that moment yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2012 19:58:10 GMT</pubDate>
    <dc:creator>GregLutz</dc:creator>
    <dc:date>2012-09-21T19:58:10Z</dc:date>
    <item>
      <title>GeoRSSLayer capture collection changed</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159943#M3998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I'm using GeoRSSLayer and I dynamically change the Source URI at runtime. I'm trying to capture when the Graphics.CollectionChanged. But it's not working. Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On page load:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rssLayer.Graphics.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Graphics_CollectionChanged);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In button click event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; &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; rssLayer.ClearGraphics(); &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; rssLayer.Source = new Uri(source); // source is a new feed url &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; rssLayer.Update();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, even though the graphics get updated successfully (I can watch during debug they go from 20 to 0, to 20, to 0, etc). the CollectionChanged event NEVER fires. I need to call ZoomTo method after the graphics layer is updated to zoom in wherever graphics are. If you have any other suggestions on how to perform a ZoomTo after the Source URI changes on a GeoRSSLayer that would work. Of course I can't just simply call ZoomTo in my code after I set the Source because it's asynchronous and I don't see any Completed type events on the GeoRSSLayer to know when it's done loading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; void Graphics_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) &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; GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map1.ZoomTo(rssLayer.FullExtent); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 19:55:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159943#M3998</guid>
      <dc:creator>GregLutz</dc:creator>
      <dc:date>2012-09-13T19:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: GeoRSSLayer capture collection changed</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159944#M3999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;AS you assign a new collection of graphics, you can subscribe to rssLayer.PropertyChanged and, in the Handler, test that the changed property is called "Graphics".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 06:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159944#M3999</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-09-14T06:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: GeoRSSLayer capture collection changed</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159945#M4000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, this does answer my question. Unfortunately it doesn't resolve my entire issue, but i'll create a new thread since the issue is unrelated now to the topic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 19:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159945#M4000</guid>
      <dc:creator>GregLutz</dc:creator>
      <dc:date>2012-09-21T19:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: GeoRSSLayer capture collection changed</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159946#M4001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I figured out my Zooming issue works if I listen for the FullExtent property to change, not the Graphics. I was afraid this code would result in an infinite loop (I thought ZoomTo changes the FullExtent property of the map control) but it apparently doesn't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; rssLayer.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(rssLayer_PropertyChanged);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;void rssLayer_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.PropertyName == "FullExtent") &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map1.ZoomTo(rssLayer.FullExtent); &amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this won't result in other problems zooming in every time the full extent property changes. If I just listen for Graphics to change, then the ZoomTo method does not work. Probably because the Graphics layer hasn't updated its layout at that moment yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 19:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/georsslayer-capture-collection-changed/m-p/159946#M4001</guid>
      <dc:creator>GregLutz</dc:creator>
      <dc:date>2012-09-21T19:58:10Z</dc:date>
    </item>
  </channel>
</rss>

