Select to view content in your preferred language

Update Listview in Dockpane from Selected Features Using MapTool

1814
4
Jump to solution
08-18-2020 11:23 AM
SeanTabin
Emerging Contributor

I have experience developing add-ins with ArcObjects, but I'm new to C# and the MVVM programming pattern. I've been reviewing community samples on GitHub and listening to video demonstrations from Esri, but haven't quite figured out how to utilize multiple Esri controls in ArcGIS Pro. 

Workflow:

1. Select point features using MapTool and open Dockpane

2. For each selected point, a row should be added to the ListView control in the Dockpane

3. Business logic will be applied to point features in ListView with the use of a button in Dockpane

I've attached my visual studio solution used to tinker with this idea and functionality. I have a relay command tied to the buttons that will load rows to the ListView, but I want that to be automated once a user creates a new selection from the MapTool. I'm open to learning best practices, but this is all I have so far.

Thank you in advance!

0 Kudos
1 Solution

Accepted Solutions
SeanTabin
Emerging Contributor

I found these two threads most helpful from Wolfgang:

https://community.esri.com/thread/251741-access-listview-inside-dockpane

https://github.com/Esri/arcgis-pro-sdk-communitysamples/tree/2d6a30e2597c7a0079ae65b182f60a77e79aaef...

There is an updated project solution in the main thread for those that require similar functionality and need help getting started.

View solution in original post

0 Kudos
4 Replies
BrianBulla
Honored Contributor

Hi,

Have you tried looking at ArcGIS Pro 2.6 API Reference Guide for the MapSelectionChangedEvent.  You could add some logic so when the selection changes to populate your listbox, etc.

Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi Sean,

 You can take a look at this sample, it implements some of the functionality that you are looking for: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/2d6a30e2597c7a0079ae65b182f60a77e79aae...

SeanTabin
Emerging Contributor

Thank you, I think I'll find this very helpful. I'll be back here soon.

0 Kudos
SeanTabin
Emerging Contributor

I found these two threads most helpful from Wolfgang:

https://community.esri.com/thread/251741-access-listview-inside-dockpane

https://github.com/Esri/arcgis-pro-sdk-communitysamples/tree/2d6a30e2597c7a0079ae65b182f60a77e79aaef...

There is an updated project solution in the main thread for those that require similar functionality and need help getting started.

0 Kudos