<?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: How can I pass a string value to a Pane from another Pane in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390246#M11187</link>
    <description>&lt;P&gt;Why do you use code behind (xaml.cs) with dockpane? Can you share parts of code?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 10:49:51 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2024-03-04T10:49:51Z</dc:date>
    <item>
      <title>How can I pass a string value to a Pane from another Pane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390123#M11184</link>
      <description>&lt;P&gt;Using ArcGIS Pro 3.2.2, I'm a novice in C# and new to the&amp;nbsp;ArcGIS Pro SDK.&lt;/P&gt;&lt;P&gt;I have a Dockpane that Zooms and selects a Feature layer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; featLayer.SetExpanded(true);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; featLayer.SetVisibility(true);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MapView.Active.ZoomToSelected();&lt;/P&gt;&lt;P&gt;It then Activates a second Dockpane, and its primary function is to update an attribute in the selected FL.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; var UpdateFeatures =&amp;nbsp; ArcGIS.Desktop.Framework.FrameworkApplication.DockPaneManager.Find("ArcGIS_Update");&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; UpdateFeatures.Activate();&lt;/P&gt;&lt;P&gt;The second&amp;nbsp;Dockpane needs to accept a string value the will automatically select a record in a listbox so that user will only need to click an Update button. What is the simplest way to achieve this?&lt;/P&gt;&lt;P&gt;At the moment my work around is, to query the selected Feature Layer to get a value that I then search in the list box and then reposition my list box selection to the record. The user then needs to click the Update button to apply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note, the List Box contains the previous value (currently set on the FL) and updated value (value set from another App) that need to be applied to the selected Feature Layer.&lt;/P&gt;&lt;P&gt;I've tried calling a public method to the .cs of the second Dockpane; this does set a public var to the value from the first Dockpane, but once the Activate is executed, it somehow runs another instance of the Pane and clobbers the value set in the public method call.&lt;/P&gt;&lt;P&gt;I also tried putting a new property in the ViewModel of the DockPane&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; public string PermitValue { get; set; }&lt;/P&gt;&lt;P&gt;but I cannot access this property from the first Dockpane&lt;/P&gt;&lt;P&gt;Thank you in advance for any help.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 03:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390123#M11184</guid>
      <dc:creator>EmersonBarrera</dc:creator>
      <dc:date>2024-03-04T03:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass a string value to a Pane from another Pane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390153#M11185</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried like this below:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var UpdateFeatures =  ArcGIS.Desktop.Framework.FrameworkApplication.DockPaneManager.Find("ArcGIS_Update");
UpdateFeatures.Activate();
(UpdateFeatures as &amp;lt;second_dockpane_viewmodel&amp;gt;).PermitValue = &amp;lt;some_value&amp;gt;; &lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 Mar 2024 06:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390153#M11185</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-03-04T06:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass a string value to a Pane from another Pane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390177#M11186</link>
      <description>&lt;P&gt;Thank you &lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133" target="_self"&gt;&lt;SPAN class=""&gt;GKmieliauskas&lt;/SPAN&gt;&lt;/A&gt;. I tried what you've suggested. The thing is, I'm getting a null value when I check the PermitValue in the XAML.cs when the DockPane is loaded. I think this is plain C# ignorance on my side but don't know where am I getting it wrong.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 07:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390177#M11186</guid>
      <dc:creator>EmersonBarrera</dc:creator>
      <dc:date>2024-03-04T07:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass a string value to a Pane from another Pane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390246#M11187</link>
      <description>&lt;P&gt;Why do you use code behind (xaml.cs) with dockpane? Can you share parts of code?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 10:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390246#M11187</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-03-04T10:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I pass a string value to a Pane from another Pane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390339#M11188</link>
      <description>&lt;P&gt;Thanks for your patience GKmieliauskas. The process starts from the first Dockpane, which is on the&amp;nbsp;else if (action == "updatepermit") of&amp;nbsp;&lt;BR /&gt;ArcSwitchboard.xaml.cs.txt where I call the&amp;nbsp;(OtherPermitUpdateFeatures as OtherPermitUpdateViewModel).permitValue = value; from here, I set the public var&amp;nbsp;permitValue on the ViewModel () in the&amp;nbsp;OtherPermitUpdateViewModel.cs.txt. And in the&amp;nbsp;OtherPermitUpdate.xaml.cs.txt I'm trying to access the public variable&amp;nbsp; in the&amp;nbsp;private void GetRecordfromDatasource()&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; var vm = new OtherPermitUpdateViewModel();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; var xyz = vm.GetPermitValue;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MessageBox.Show(xyz.ToString());&lt;/P&gt;&lt;P&gt;It is a bit of a mess at the moment as I've been trying all sorts of things. But the intention is to use the&amp;nbsp;PermitValue or permitNum to reposition/select my Listbox record so I can apply the New Permit number to the Feature Layer currently selected once the user click on the Updat button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 16:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-can-i-pass-a-string-value-to-a-pane-from/m-p/1390339#M11188</guid>
      <dc:creator>EmersonBarrera</dc:creator>
      <dc:date>2024-06-28T16:54:00Z</dc:date>
    </item>
  </channel>
</rss>

