<?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 General Question about Relay Command &amp; Event Handlers with WPF Controls in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/general-question-about-relay-command-event/m-p/701335#M10</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GeoNet Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm continuing to learn and implement the MVVM for various add-in projects and would like know best practices for accessing event handlers of various WPF controls (DataGrid, ListView, Button) through the use of Relay Command and/or Event Triggers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this particular case, I'm using a DataGrid WPF control inside an Esri Dockpane control and I would like to access the various event handlers of the DataGrid like MouseDoubleClick, CellEditEnding, etc. What are some way I can tap into these events within MVVM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;There's suggestions that I have to download Blend SDK package or otherwise to access the behavior or interaction/interactivity namespaces in order to do something like the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="511586" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/511586_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A class="link-titled" href="https://stackoverflow.com/questions/20743961/the-name-interaction-does-not-exist-in-the-namespace-http-schemas-microsoft" title="https://stackoverflow.com/questions/20743961/the-name-interaction-does-not-exist-in-the-namespace-http-schemas-microsoft"&gt;c# - The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity"…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found something similar here on GeoNet, but it&amp;nbsp;is a very&amp;nbsp;different use-case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="511587" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/511587_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/229757-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment" title="https://community.esri.com/message/877665-re-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment-877665"&gt;https://community.esri.com/message/877665-re-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment-877665&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems as though the way to go is to bind a Relay Command to an Event Handler like the code examples above. Can anyone provide example on how this should work in the code spaces of the XML and VM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Oct 2020 17:16:53 GMT</pubDate>
    <dc:creator>SeanTabin</dc:creator>
    <dc:date>2020-10-22T17:16:53Z</dc:date>
    <item>
      <title>General Question about Relay Command &amp; Event Handlers with WPF Controls</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/general-question-about-relay-command-event/m-p/701335#M10</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GeoNet Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm continuing to learn and implement the MVVM for various add-in projects and would like know best practices for accessing event handlers of various WPF controls (DataGrid, ListView, Button) through the use of Relay Command and/or Event Triggers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this particular case, I'm using a DataGrid WPF control inside an Esri Dockpane control and I would like to access the various event handlers of the DataGrid like MouseDoubleClick, CellEditEnding, etc. What are some way I can tap into these events within MVVM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;There's suggestions that I have to download Blend SDK package or otherwise to access the behavior or interaction/interactivity namespaces in order to do something like the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="511586" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/511586_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A class="link-titled" href="https://stackoverflow.com/questions/20743961/the-name-interaction-does-not-exist-in-the-namespace-http-schemas-microsoft" title="https://stackoverflow.com/questions/20743961/the-name-interaction-does-not-exist-in-the-namespace-http-schemas-microsoft"&gt;c# - The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity"…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found something similar here on GeoNet, but it&amp;nbsp;is a very&amp;nbsp;different use-case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="511587" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/511587_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/229757-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment" title="https://community.esri.com/message/877665-re-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment-877665"&gt;https://community.esri.com/message/877665-re-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment-877665&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems as though the way to go is to bind a Relay Command to an Event Handler like the code examples above. Can anyone provide example on how this should work in the code spaces of the XML and VM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2020 17:16:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/general-question-about-relay-command-event/m-p/701335#M10</guid>
      <dc:creator>SeanTabin</dc:creator>
      <dc:date>2020-10-22T17:16:53Z</dc:date>
    </item>
  </channel>
</rss>

