<?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: WPF Dockpane: How to auto-refresh Listbox contents with changes from the Pro Content list in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1369660#M11000</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/LayerSnapModes" target="_self"&gt;LayerSnapModes&lt;/A&gt;&amp;nbsp;sample. It uses&amp;nbsp;ActiveMapViewChangedEvent,&amp;nbsp;LayersAddedEvent and&amp;nbsp;LayersRemovedEvent to populate snap list.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 17:04:48 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2024-01-12T17:04:48Z</dc:date>
    <item>
      <title>WPF Dockpane: How to auto-refresh Listbox contents with changes from the Pro Content list</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1368648#M10994</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I have a Pro SDK add-in tool (a dockpane). It has a listbox that I populate with the feature layers from the Contents pane. Currently, it's using a Refresh button that the end-user can manually click to update the listbox if anything changes within the Contents pane. That's working fine. However, I'd like to enhance this a bit to auto-update the listbox based on "live" changes from the Contents pane. Examples could be if someone imports a new feature layer into the map or a feature layer gets renamed while the dockpane is open.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anonymous_geographer_0-1704922591965.png" style="width: 491px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91140i547FCEA9184325B1/image-dimensions/491x462?v=v2" width="491" height="462" role="button" title="anonymous_geographer_0-1704922591965.png" alt="anonymous_geographer_0-1704922591965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm starting to get the hang of Pro SDK and WPF/XAML, but still have a lot to learn. Is it possible to "monitor" the Contents pane and auto-update the listbox? If so, what approach would I use to accomplish that? Thanks for any advice.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 21:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1368648#M10994</guid>
      <dc:creator>David_Lindsey</dc:creator>
      <dc:date>2024-01-10T21:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: WPF Dockpane: How to auto-refresh Listbox contents with changes from the Pro Content list</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1369660#M11000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/LayerSnapModes" target="_self"&gt;LayerSnapModes&lt;/A&gt;&amp;nbsp;sample. It uses&amp;nbsp;ActiveMapViewChangedEvent,&amp;nbsp;LayersAddedEvent and&amp;nbsp;LayersRemovedEvent to populate snap list.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 17:04:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1369660#M11000</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-01-12T17:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: WPF Dockpane: How to auto-refresh Listbox contents with changes from the Pro Content list</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1369836#M11002</link>
      <description>&lt;P&gt;Thanks! That got me on the right track and is working for me now. Ended up implementing these subscriptions:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ActiveMapViewChangedEvent.Subscribe(func_OnActiveMapViewChanged); // if active map changes
LayersAddedEvent.Subscribe(func_OnLayersAddRem); // if feature layer added
LayersRemovedEvent.Subscribe(func_OnLayersAddRem); // if feature layer removed
LayersMovedEvent.Subscribe(func_OnLayersAddRem); // if feature layer reordered
MapMemberPropertiesChangedEvent.Subscribe(func_OnMapMembersPropertyChanged); // if feature layer renamed&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 22:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/wpf-dockpane-how-to-auto-refresh-listbox-contents/m-p/1369836#M11002</guid>
      <dc:creator>David_Lindsey</dc:creator>
      <dc:date>2024-01-12T22:40:53Z</dc:date>
    </item>
  </channel>
</rss>

