POST
|
Hi GeoNet Community, 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. 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? 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: Source: c# - The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity"… I found something similar here on GeoNet, but it is a very different use-case: Source: https://community.esri.com/message/877665-re-wpf-and-mvvm-geoviewtapped-event?commentID=877665#comment-877665 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? Thank you in advance, Sean
... View more
10-22-2020
10:16 AM
|
0
|
0
|
602
|
POST
|
I found these two threads most helpful from Wolfgang: https://community.esri.com/thread/251741-access-listview-inside-dockpane https://github.com/Esri/arcgis-pro-sdk-communitysamples/tree/2d6a30e2597c7a0079ae65b182f60a77e79aaef7/Map-Exploration/IdentifyWindow There is an updated project solution in the main thread for those that require similar functionality and need help getting started.
... View more
08-20-2020
02:32 PM
|
0
|
0
|
1335
|
POST
|
Thank you, I think I'll find this very helpful. I'll be back here soon.
... View more
08-18-2020
01:19 PM
|
0
|
0
|
1335
|
POST
|
I have experience developing add-ins with ArcObjects, but I'm new to C# and the MVVM programming pattern. I've been reviewing community samples on GitHub and listening to video demonstrations from Esri, but haven't quite figured out how to utilize multiple Esri controls in ArcGIS Pro. Workflow: 1. Select point features using MapTool and open Dockpane 2. For each selected point, a row should be added to the ListView control in the Dockpane 3. Business logic will be applied to point features in ListView with the use of a button in Dockpane I've attached my visual studio solution used to tinker with this idea and functionality. I have a relay command tied to the buttons that will load rows to the ListView, but I want that to be automated once a user creates a new selection from the MapTool. I'm open to learning best practices, but this is all I have so far. Thank you in advance!
... View more
08-18-2020
11:23 AM
|
0
|
4
|
1410
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|