<?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: Access listview inside dockpane in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764234#M356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am attaching a sample project for you that demonstrates how to populate a listbox with two columns using the first two columns of a spreadsheet.&amp;nbsp; I think this is a useful sample and I will add it with the next release to the community samples.&amp;nbsp; The add-in looks for a .csv file that I included in the project source as well (it's called&amp;nbsp;Meteorites_UK.csv).&amp;nbsp; You can read any file that can be opened with Excel with this code but you have to match the sheet name and column count.&amp;nbsp; To run the add-in, open the "Show Spreadsheet" dockpane, then use the "import csv" button to browse to&amp;nbsp;&lt;SPAN&gt;Meteorites_UK.csv.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/490536_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you click "Open" on the input selection dialog you see the listbox getting populated.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/490537_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;If you look at&amp;nbsp;ShowSpreadsheet.xaml you find that the listview is bound to two properties:&amp;nbsp;SpreadSheetRows for the ItemsSource and&amp;nbsp;SelectedSpreadSheetRow for the SelectedItem attributes.&amp;nbsp; If you then look in the code behind file ShowSpreadsheetViewModel.cs you see the appropriate properties that match these 'bindings':&amp;nbsp;&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; ObservableCollection&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;SpreadSheetColumns&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SpreadSheetRows‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt; &lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; SpreadSheetColumns SelectedSpreadSheetRow‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When you look at these properties you will notice that both are using 'SetProperty' in the setter. 'SetProperty' is important because it initiates the notification mechanism that notifies the UI when one of these properties is changed (or 'set').&amp;nbsp; This mechanism is called data binding and you can read up on it if you search for 'WPF data binding'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways I hope this sample helps.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 May 2020 00:07:40 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2020-05-01T00:07:40Z</dc:date>
    <item>
      <title>Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764230#M352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm a new with both C# and Pro SDK.&amp;nbsp; I have to convert my vb.net ArcMap addin to Pro.&amp;nbsp; I'm taking baby steps here so please bear with me.&amp;nbsp; &amp;nbsp;Today I'm trying to write codes for the addin for user to open an excel file and import a column to a list view which I put inside a dockpane.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got errors at&amp;nbsp;&lt;/P&gt;&lt;P&gt;lstviewAllAcct.View = View.Details;&amp;nbsp; //error: View does not exist in the current context&lt;BR /&gt; lstviewAllAcct.GridLines = true; //error: 'ListView' does not contain a definition for&amp;nbsp;&lt;/P&gt;&lt;P&gt;GridLines and no accessible extension method&lt;BR /&gt; lstviewAllAcct.FullRowSelect = true; //error: same as above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to I access the properties of my listview? Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; ArcGIS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Desktop&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Catalog&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; Microsoft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Win32&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; OfficeOpenXml&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//reference EPPlus (excelpackage)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Collections&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Generic&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Linq&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Text&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Threading&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Tasks&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Controls&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Data&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Documents&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Input&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Media&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Media&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Imaging&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Navigation&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Shapes&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


&lt;SPAN class="keyword token"&gt;namespace&lt;/SPAN&gt; ProAppApril92
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;/// Interaction logic for Dockpane1View.xaml&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;partial&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Dockpane1View&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; UserControl
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Dockpane1View&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;InitializeComponent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;BtnOpenExcelFile_Click&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt; sender&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RoutedEventArgs e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            Microsoft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Win32&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OpenFileDialog openFileDialog1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;OpenFileDialog&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            openFileDialog1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InitialDirectory &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;@"c:\";
            openFileDialog1.Filter = "&lt;/SPAN&gt;XLSX Files &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;xlsx&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;xlsx&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;XLS Files &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;xls&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;xls&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;All files &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;"&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            openFileDialog1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FilterIndex &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            openFileDialog1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RestoreDirectory &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            openFileDialog1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ShowDialog&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; package &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ExcelPackage&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; workbook &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; package&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Workbook&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workbook &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sheet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; workbook&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; firstColumnRows &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sheet&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Cells&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"A1:A"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
                &lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt; cell&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                lstviewAllAcct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;View &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; View&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Details&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                lstviewAllAcct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GridLines &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                lstviewAllAcct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FullRowSelect &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

            &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;
                System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;openFileDialog1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Title&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

  
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764230#M352</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2021-12-12T08:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764231#M353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you implement a dockpane using the Pro SDK it supports MVVM (Model - View - ViewModel) out of box.&amp;nbsp; You can check out this video (starting at minute 20:00 of the video) to get an overview of MVVM in the Pro SDK:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=5PgaeZycWXc"&gt;https://www.youtube.com/watch?v=5PgaeZycWXc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What this means is that the Pro SDK Item Template for DockPanes creates multiple files in support of MVVM for you.&amp;nbsp; These files are used for:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The View (or UI): &lt;STRONG&gt;Dockpane1.xaml&lt;/STRONG&gt; (and included with the XAML is the usually hidden &lt;STRONG&gt;Dockpane1.cs&lt;/STRONG&gt; file containing the partial class implementation of the Dockpane1View /&amp;nbsp;UserControl class).&amp;nbsp; If you make any changes to the View you ONLY make these changes in XAML.&amp;nbsp; You would not make any changes in the code behind for the View&amp;nbsp;(&lt;SPAN&gt;Dockpane1View.cs file)&lt;/SPAN&gt; when you are coding using the MVVM programming pattern &lt;SPAN&gt;.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;The ViewModel (or business logic, code behind):&amp;nbsp;&lt;STRONG&gt;Dockpane1ViewModel.cs&lt;/STRONG&gt;&amp;nbsp;contains the actual business logic and the properties to exchange data at runtime with the View using data binding.&amp;nbsp; In MVVM this is were all code (business logic) goes, including the properties (which must be public) that are 'data bound' to the View (UI implemented in XAML)&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at&amp;nbsp;your code snippet&amp;nbsp;I&amp;nbsp;see that you mixed MVVM with a non MVVM pattern.&amp;nbsp; To implemented a command using the MVVM pattern, you have to utilize&amp;nbsp;what is known as the ICommand pattern.&amp;nbsp; There a plenty of examples under the Pro SDK community sample github repo, but you can search for&amp;nbsp;&lt;STRONG&gt;BrowseCommand &lt;/STRONG&gt;in the UploadItem sample and you find the XAML implementation here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/f5f9dda18efa173a56d128f3ea64ca34ac3f68a9/Sharing/UploadItem/UploadItem.xaml#L69" title="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/f5f9dda18efa173a56d128f3ea64ca34ac3f68a9/Sharing/UploadItem/UploadItem.xaml#L69"&gt;arcgis-pro-sdk-community-samples/UploadItem.xaml at f5f9dda18efa173a56d128f3ea64ca34ac3f68a9 · Esri/arcgis-pro-sdk-commu…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the business logic for the BrowseCommand button is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/f5f9dda18efa173a56d128f3ea64ca34ac3f68a9/Sharing/UploadItem/UploadItemViewModel.cs#L132" title="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/f5f9dda18efa173a56d128f3ea64ca34ac3f68a9/Sharing/UploadItem/UploadItemViewModel.cs#L132"&gt;arcgis-pro-sdk-community-samples/UploadItemViewModel.cs at f5f9dda18efa173a56d128f3ea64ca34ac3f68a9 · Esri/arcgis-pro-sd…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 23:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764231#M353</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-04-16T23:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764232#M354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.&amp;nbsp; I'll work on it and keep you posted.&amp;nbsp; I still can't wrap my brain around this.&amp;nbsp; Addin for Arcmap was a lot more straight forward to me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2020 13:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764232#M354</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2020-04-17T13:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764233#M355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wolfgang,&lt;/P&gt;&lt;P&gt;I've been studying the sample&amp;nbsp;you suggested.&amp;nbsp; I understand it a bit more but I'm still pvery much in dark.&amp;nbsp; Hopefully you can shed some more light&amp;nbsp;on me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I find case of textbox, it uses&amp;nbsp;&amp;lt;TextBox Text="{Binding ItemID}"&amp;gt;&amp;nbsp;in .xaml file, to bind the data returned from the codes in&amp;nbsp;Dockpane1ViewModel.cs&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;My case I have to use listview to list all lines returned from excel.&amp;nbsp; Which property of listview should I use for binding&amp;nbsp;&lt;SPAN&gt;in .xaml file&lt;/SPAN&gt; ?&lt;/P&gt;&lt;P&gt;And many properties like&amp;nbsp; View = View.Details; GridLines = true; FullRowSelect = true are not available in .xaml too.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---codes from my arcmap addin---------------&lt;/P&gt;&lt;P&gt;Dim workbook = package.Workbook&lt;BR /&gt; If workbook IsNot Nothing Then&lt;BR /&gt; Dim sheet = workbook.Worksheets(1)&lt;BR /&gt; Dim firstColumnRows = sheet.Cells("A1:A") ' Loop through rows in the first column, get values based on offset&lt;BR /&gt; Dim cell As Object&lt;BR /&gt; myForm.lstAllAcct.View = View.Details&lt;BR /&gt; myForm.lstAllAcct.Clear()&lt;/P&gt;&lt;P&gt;myForm.lstAllAcct.Columns.Add("Account Number", 122)&lt;/P&gt;&lt;P&gt;For Each cell In firstColumnRows&lt;BR /&gt; Dim column1CellValue = cell.GetValue(Of String)()&lt;BR /&gt; lvItem = myForm.lstAllAcct.Items.Add(Trim(column1CellValue.ToString))&lt;BR /&gt; Next&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2020 22:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764233#M355</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2020-04-29T22:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764234#M356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am attaching a sample project for you that demonstrates how to populate a listbox with two columns using the first two columns of a spreadsheet.&amp;nbsp; I think this is a useful sample and I will add it with the next release to the community samples.&amp;nbsp; The add-in looks for a .csv file that I included in the project source as well (it's called&amp;nbsp;Meteorites_UK.csv).&amp;nbsp; You can read any file that can be opened with Excel with this code but you have to match the sheet name and column count.&amp;nbsp; To run the add-in, open the "Show Spreadsheet" dockpane, then use the "import csv" button to browse to&amp;nbsp;&lt;SPAN&gt;Meteorites_UK.csv.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/490536_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you click "Open" on the input selection dialog you see the listbox getting populated.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/490537_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;If you look at&amp;nbsp;ShowSpreadsheet.xaml you find that the listview is bound to two properties:&amp;nbsp;SpreadSheetRows for the ItemsSource and&amp;nbsp;SelectedSpreadSheetRow for the SelectedItem attributes.&amp;nbsp; If you then look in the code behind file ShowSpreadsheetViewModel.cs you see the appropriate properties that match these 'bindings':&amp;nbsp;&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; ObservableCollection&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;SpreadSheetColumns&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; SpreadSheetRows‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt; &lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; SpreadSheetColumns SelectedSpreadSheetRow‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When you look at these properties you will notice that both are using 'SetProperty' in the setter. 'SetProperty' is important because it initiates the notification mechanism that notifies the UI when one of these properties is changed (or 'set').&amp;nbsp; This mechanism is called data binding and you can read up on it if you search for 'WPF data binding'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways I hope this sample helps.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2020 00:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764234#M356</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-05-01T00:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Access listview inside dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764235#M357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so very much Wolfgang.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 19:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/access-listview-inside-dockpane/m-p/764235#M357</guid>
      <dc:creator>helenchu</dc:creator>
      <dc:date>2020-05-05T19:37:45Z</dc:date>
    </item>
  </channel>
</rss>

