Select to view content in your preferred language

Convert ComboBox to Listview

745
5
10-20-2023 07:30 AM
Pottawattamie_CountyGIS
New Contributor

I am new to ArcGIS Pro SDK and am trying to wrap my head around the code using the samples. I took the sample ComboBoxSelectFeature from this thread https://community.esri.com/t5/arcgis-pro-sdk-questions/list-values-from-a-field-in-combo-box-zoom-to... and have that working. I would like to modify this and use a listview inside of a Dockpane instead of the ComboBox. I am struggling to get this started and not sure how to modify the code to accomplish this. Can anyone point me in the right direction or have a sample that would help? TIA

0 Kudos
5 Replies
EarlMedina
Esri Regular Contributor
0 Kudos
RichardDaniels
Frequent Contributor

If you have not done an Add-In before, spend a few minutes to understand how the projected is wired together. As a start look at the config.daml file and understand what the XML tags mean. One key, is everytime you rebuild the Add-In for debug you need to updated the <Date> tag to a newer date/time, otherwise ArcGIS Pro will not reload the code. Second is that in the <modules> section you define a Module ID, usually in the <insertModule id> tag, this has our className  value that is used to connect the interface (partially designed in the config.daml) to your underlying code. For example, if your className="LoadMyToolCode" then you would need a LoadMyToolCode.cs file in your solution. This cs file usually only has 53 lines since its entire purpose is to load and launch your code module when the button defined in the Config.xml is clicked in ArcGIS Pro. 

0 Kudos
ViktorSafar
Frequent Contributor

One key, is everytime you rebuild the Add-In for debug you need to updated the <Date> tag to a newer date/time, otherwise ArcGIS Pro will not reload the code.

I do not think that is true at all. (Regards from someone who has been actively developing an Addin in the last 3 months)

0 Kudos
ViktorSafar
Frequent Contributor

Hard to help without seeing your code. 

However, based on what you write, it appears you do not know your way around WPF which will make Addin development difficult for you. I suggest you do at least a crash course in WPF.

0 Kudos
Pottawattamie_CountyGIS
New Contributor

My main problem, other than being new, is figuring out how to Bind my source to the Listview. I am looking at this example by Wolf https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764230 and trying to figure out how to bind it to my feature layer instead of an excel spreadsheet.

0 Kudos