<?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: ArcGIS ProWindow binding child view to viewmodel through datatemplate in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009743#M5870</link>
    <description>&lt;P&gt;Should I switch over to dockpane instead? My workflow will be to preprocess the camera/frame data before adding frame camera data to a mosaic dataset. I was planning on several views to handle the inputs, etc.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 14:39:31 GMT</pubDate>
    <dc:creator>AzharIbrahim</dc:creator>
    <dc:date>2020-12-15T14:39:31Z</dc:date>
    <item>
      <title>ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008698#M5862</link>
      <description>&lt;P&gt;I did a test project with a main window, and changing out the content based on the selected viewmodel. This worked fine using data templates and binding content to the viewmodel.&lt;/P&gt;&lt;P&gt;I created an ArcGIS Pro addin using ProWindow. This window is using the main view model fine. If I add a view to the xml directly and set the data context of this view to the child view model, this displays fine. If I try to use a datatemplate for the viewmodel to bind to the view, I only see the name of the viewmodel class.&lt;/P&gt;&lt;P&gt;Since the ProWindow, does not create the app.xaml, I can't add the datatemplate to the app.resources, but have added it to the prowindow.resources. I'm not sure what else to try.&lt;/P&gt;&lt;P&gt;Adding the datatemplate worked fine in my other project, so I'm not sure what may be going on. I was using a bindable base class implementing INotifyPropertyChanged for all of my view models. I switched it over to the ESRI framework version just in case, with no change in outcome. I am new to WPF which is why I tested it separately from the ArcGIS Addin project first.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 21:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008698#M5862</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-10T21:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008702#M5863</link>
      <description>&lt;P&gt;Can you attach a sample solution (a simple add-in with your ProWindow) that includes your issue?&amp;nbsp; &amp;nbsp;Our ProWindow item template doesn't support MVVM out of box.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 22:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008702#M5863</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-12-10T22:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008710#M5865</link>
      <description>&lt;P&gt;I have my current version that I'll attach. a main view with a content control bound to a view model. If I actually replace the content control with the view and set the data context to the view model it's fine. I want to be able to switch out views though during the pre-processing of input data. I've tried putting the data template inside the resource dictionary with no change. I've only added a single property to test the bindings&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 22:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1008710#M5865</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-10T22:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009743#M5870</link>
      <description>&lt;P&gt;Should I switch over to dockpane instead? My workflow will be to preprocess the camera/frame data before adding frame camera data to a mosaic dataset. I was planning on several views to handle the inputs, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 14:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009743#M5870</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-15T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009937#M5871</link>
      <description>&lt;P&gt;Sorry about the delay but we started with the 2.7 Pro &amp;amp; Pro SDK release, so we were very busy for the last few days.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding your UI design, I would definitely go with a Dockpane.&amp;nbsp; Dockpanes are singletons and can be docked or can be floating, they will also open automatically if Pro was closed with a dockpane open, making it the better choice.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the ProWindow, there is a MVVM samples available here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProWindowMVVM" target="_blank"&gt;arcgis-pro-sdk-community-samples/Framework/ProWindowMVVM at master · Esri/arcgis-pro-sdk-community-samples (github.com)&lt;/A&gt; Regarding the approach you took with the solution you attached, you cannot use any ArcGIS Pro components (like ProWindow, Dockpane) unless the component is part of either an 'Add-in Module' or a 'Managed Configuration'.&amp;nbsp; Both (add-ins and configurations) are run from within ArcGIS Pro as extensions and they cannot be run from standalone WPF applications.&amp;nbsp; Pro SDK UI components require the UI Framework that is built into ArcGIS Pro.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can look through our samples to get an idea of what is possible with the Pro SDK UI.&amp;nbsp; Most samples have a few screen shots attached to the documentations, like for example here (scroll to the bottom of the page to get the description on how to use the app):&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/BingStreetside" target="_blank"&gt;arcgis-pro-sdk-community-samples/Map-Exploration/BingStreetside at master · Esri/arcgis-pro-sdk-community-samples (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 21:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009937#M5871</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-12-15T21:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009947#M5872</link>
      <description>&lt;P&gt;For the sample I attached, it was an ArcGIS pro module with the pro window added as an ArcGIS component. I'm currently testing options for the UI, before I start on the view models. If the bindings don't work the same way that they did in my standard wpf project, I'll need to sort this out first.&lt;/P&gt;&lt;P&gt;I was trying to bind the view to the current view model as a way to switch views for the pre-processing of different input data. I tried using the dockpane today, and it had the same issue with binding the view to the selected view model. I may have to just set up all of my views for the different parts of my tool and set the data context from the view. I prefer the other way.&lt;/P&gt;&lt;P&gt;I would rather the tool only open if the user clicks the button and not remain open, which is why I went with the ProWindow.&lt;/P&gt;&lt;P&gt;I'll take a look at the links you supplied.&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 21:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009947#M5872</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-15T21:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009974#M5873</link>
      <description>&lt;P&gt;Under the Pro UI Framework the data context is set using the className attribute of the dockpane tag from the config.daml.&amp;nbsp; In the config.daml snippet below, the DataContext is set to FlightDataViewModel for the FlightDataView view class.&amp;nbsp; This is done when the Dockpane is activated for the first time.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dockPane id="xxxx" caption="..." className="FlightDataViewModel" dock="bottom"&amp;gt;
  &amp;lt;content className="FlightDataView" /&amp;gt;
&amp;lt;/dockPane&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In order to show/hide a dockpane you can use this code:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string _dockPaneID = "xxxx";  // DockPane ID from config.daml above
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
// pane not found
if (pane == null) return null;
// pane is already displaying
if (pane.IsVisible) return pane;
// activate (show) the pane, Activate method has optional focus parameter
pane.Activate();

// or hide the pane
pane.Hide();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 22:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1009974#M5873</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-12-15T22:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010111#M5878</link>
      <description>&lt;P&gt;I&amp;nbsp; did some more testing today and was able to get my child views working as expected. I just have a couple of very simple child views to verify that the datatemplate binding is working correctly.&amp;nbsp; I started over with the ProWindow, but may switch over to dockpane later.. I like that the pro window viewmodel is separate from the view. I think I'll be able to separate out the pre-processing steps to different views and it will work better for the end user.&lt;/P&gt;&lt;P&gt;Is there a way to pass a parameter to the RelayCommand? I would like to have a single command for changing the view model and pass it a string value.&lt;/P&gt;&lt;P&gt;Nevermind--I found the override on the constructor to pass in a parameter. Nice to simplify to a single change view method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010111#M5878</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-16T18:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010263#M5880</link>
      <description>&lt;P&gt;Yes you can pass parameters. If you search for CommandParameter in the XAML for this sample: &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/19a330dcbe57cdbbde7f0762e9321aa7b411c827/Framework/ProWindowMVVM/ProWindowDialog.xaml" target="_self"&gt;ProWindow MVVM&lt;/A&gt; you can find an example of RelayCommand parameters.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010263#M5880</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-12-16T18:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS ProWindow binding child view to viewmodel through datatemplate</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010267#M5881</link>
      <description>&lt;P&gt;Thank you--I found the constructor override just a bit ago. I didn't have an issue on the xaml side. It was figuring out the constructor for RelayCommand that would accept a type. I didn't realize I would have to add all of the other parameters even though I'm not using them.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic10262.html" target="_blank"&gt;ArcGIS Pro 2.7 API Reference Guide - RelayCommand Constructor(Action&amp;lt;Object&amp;gt;,Func&amp;lt;Object,Boolean&amp;gt;,Boolean,Boolean)—ArcGIS Pro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you again for your help. It's a big change switching from winform/arc objects to wpf/arcgis pro.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-prowindow-binding-child-view-to-viewmodel/m-p/1010267#M5881</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2020-12-16T18:58:31Z</dc:date>
    </item>
  </channel>
</rss>

