<?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: MVVM - View and ViewModel Problems in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412844#M2059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="color: #3e3e3e; font-family: Arial;"&gt;As &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;atomaras said, that solution works quite well in most of the scenarios. Just check that UIVirtualization is support is ok for your needs.&lt;BR /&gt;&lt;BR /&gt;Simplest solution is to create codebehind event handler and then direct selection to viewmodel from there. Yes, it's code in the codebehind but in this kind of scenarios it is ok. I use this solution if I'm lazy and want fast results. &lt;BR /&gt;&lt;BR /&gt;One solution is to create attached property that encapsulates that but that needs a bit more testing. This was found with fast googling &lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html"&gt;http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html&lt;/A&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&lt;BR /&gt;&lt;BR /&gt;(side note, if you guys are coming to DevSummit to Palm Springs this year, I would love to have a chat about MVVM and how you do it).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2014 07:47:51 GMT</pubDate>
    <dc:creator>AnttiKajanus1</dc:creator>
    <dc:date>2014-02-25T07:47:51Z</dc:date>
    <item>
      <title>MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412826#M2041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the MVVM pattern and the WPF API to build a mapping app.&amp;nbsp; I have a map object defined in a View and my app logic is defined in a ViewModel.&amp;nbsp; The ViewModel is set as the datacontext of the View.&amp;nbsp; Everything works great until I try to do something like work with the draw object in the ViewModel.&amp;nbsp; The draw constructor requires a reference to the map which I cannot access in the ViewModel.&amp;nbsp; This of course prevents me from defining the draw object in the ViewModel which is needed to respond to events on the draw object.&amp;nbsp; I could define the draw object in the View but it goes against the MVVM pattern to reference the View from the ViewModel.&amp;nbsp; So the dilemma is that I have no way of getting a reference to the map or draw object in the ViewModel and thus no way to handle events raised by those objects and no way to access their properties.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I were to define the draw object in my view I could setup commanding to handle some of the logic in the ViewModel, but I have requirements that would be difficult to implement with that design.&amp;nbsp; I would prefer to have the draw object (and other esri related objects) defined in the ViewModel and bound to the View somehow, but finding a good way to accomplish that is elusive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I am using MVVM (fairly strictly) I do not want any (or very limited) amounts of code in the view code-behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone offer guidance on best practices for handling this type of scenario?&amp;nbsp; Is there a way to make this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cory&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 13:40:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412826#M2041</guid>
      <dc:creator>CorySchinkel</dc:creator>
      <dc:date>2012-03-20T13:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412827#M2042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a similar issue. My application is also strict MVVM. If I declare my &amp;lt;esri:Map&amp;gt; in a DataTemplate, that is part of the UI and not DataContext(view-model). So in the ViewModel side, I have no access to the esri:Map for doing things like setting off a saved extent. It seems that despite the updates to GraphicsLayer, the esri:Map is not MVVM friendly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 21:40:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412827#M2042</guid>
      <dc:creator>AlexAgranov</dc:creator>
      <dc:date>2012-03-22T21:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412828#M2043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We ran into the same problems building ArcGIS Explorer Online with the ArcGIS Silverlight API, and most recently with the ArcGIS Viewer for Windows and the WPF API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm at the DevSummit this week (and actually doing a session on MVVM) so if you're around I'd love to talk with you about it. When I have some spare cycles I'll put together some thoughts on how we've approached MVVM and the Map control and post it back to this thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 15:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412828#M2043</guid>
      <dc:creator>JeffJackson</dc:creator>
      <dc:date>2012-03-26T15:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412829#M2044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We ran into the same problems building ArcGIS Explorer Online with the ArcGIS Silverlight API, and most recently with the ArcGIS Viewer for Windows and the WPF API. &lt;BR /&gt;&lt;BR /&gt;I'm at the DevSummit this week (and actually doing a session on MVVM) so if you're around I'd love to talk with you about it. When I have some spare cycles I'll put together some thoughts on how we've approached MVVM and the Map control and post it back to this thread.&lt;BR /&gt;&lt;BR /&gt;-Jeff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That would be wonderful. I've been going through the same problems that others here have trying to force the WPF API into the MVVM mindset, and I have to admit that my solution was to be more flexible with my MVVMness - my MapView class has rather a lot of logic in it, unfortunately, with all of the map-specific functionality (selection, zoom/pan, etc) handled in the View, while the MapViewModel mostly handles bringing in the Layers and interacting with other parts of the system. It's not ideal, but it works. I'd love to hear a good write-up of the ups and downs of MVVM with the ArcGIS APIs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 07:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412829#M2044</guid>
      <dc:creator>AvnerKashtan</dc:creator>
      <dc:date>2012-03-27T07:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412830#M2045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We ran into the same problems building ArcGIS Explorer Online with the ArcGIS Silverlight API, and most recently with the ArcGIS Viewer for Windows and the WPF API. &lt;BR /&gt;&lt;BR /&gt;I'm at the DevSummit this week (and actually doing a session on MVVM) so if you're around I'd love to talk with you about it. When I have some spare cycles I'll put together some thoughts on how we've approached MVVM and the Map control and post it back to this thread.&lt;BR /&gt;&lt;BR /&gt;-Jeff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jeff, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just finished the video on esri's site of your seminar session. Did you ever get around to sparing a few cycles on MVVM and map control?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 17:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412830#M2045</guid>
      <dc:creator>JaredWhite</dc:creator>
      <dc:date>2012-04-27T17:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412831#M2046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was hoping to write a series of blog posts on blogs.esri.com but the new site doesn�??t do a good job formatting source code so I�??ve been waiting for some improvements before investing a lot of time on it. In the meantime, here�??s a sample MVVM application (attached) that shows how you can work around the fact that the Map control does not expose a dependency property for its Extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The app shows a map of the US and lets you enter text and search for states. The results are displayed on the map and listed beside it. Clicking on a state in the list will zoom the map to its extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is made possible by an attached property defined in the static class MapHelpers and it specified in the View like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt; &amp;lt;esri:Map local:MapHelpers.Extent="{Binding MapExtent}"&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The attached property is straight forward. The only logic is in OnExtentPropertyChanged where the DependencyObject is cast to a Map so that ZoomTo can be called, passing in the NewValue. This implementation is very straight forward in that it only allows for one way binding �?? from the VM to the Map.( In some cases you might want a two-way binding such that when the end user zooms or pans the current extent of the map is propagated back to the VM. That is also possible by wiring into the Map�??s ExtentChanged property.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt; &lt;BR /&gt;// note that I tried very hard to paste the code in question here &lt;BR /&gt;// so you could see what i was talking about&lt;BR /&gt;// but this lame resource center forum wouldn't allow it. Sheesh...&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I didn�??t use the Map�??s Extent property to do the zooming. The ZoomTo method provides a nicer implementation, using a smooth animation when you zoom in or out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this was helpful at all. Next I�??ll look into the elusive Draw object�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 19:05:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412831#M2046</guid>
      <dc:creator>JeffJackson</dc:creator>
      <dc:date>2012-05-17T19:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412832#M2047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I�??ve given the question of how to use the Draw object in an MVVM-friendly way some thought and tried a few different things. Here�??s my take on the cleanest solution (attached), though it�??s certainly got some blemishes�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree with Cory�??s basic principle �?? that the Draw object makes sense as part of the ViewModel. So I declare it there and it�??s easy enough to create and use. The only question is how to get the Map set into it. For that I rely on an EventTrigger defined on the View�??s root Grid. An InvokeCommandAction lets me call a method on the ViewModel and pass in the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;i:Interaction.Triggers&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;i:EventTrigger EventName="Loaded"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;i:InvokeCommandAction Command="{Binding ConverterParameter=SetMap, Converter={framework:CommandGenerator} }"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CommandParameter="{Binding ElementName=MyMap}" /&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/i:EventTrigger&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/i:Interaction.Triggers&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the SetMap method simply connects the map to the Draw object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing to watch out for when you �??cheat�?? like this is to make sure that the various methods on the ViewModel are still testable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412832#M2047</guid>
      <dc:creator>JeffJackson</dc:creator>
      <dc:date>2021-12-11T18:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412833#M2048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to the MVVM pattern and I am trying to learn how to use your MvvmFramework to setup methods to handle events in a ViewModel using your CommandGenerator. In your previous post, it appears that you are using a library from Expression Studios (System.Windows.Interactivity). Is it possible to use the CommandGenerator to setup a method to handle an event for something like the SelectionChanged event of a combobox without using the Expression Studios library? Any help is greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 19:29:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412833#M2048</guid>
      <dc:creator>KeithWeber1</dc:creator>
      <dc:date>2012-06-27T19:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412834#M2049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keith,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to wire up a method on your ViewModel to some arbitrary event, then you need to use something like the InvokeCommandAction which is defined in System.Windows.Interactivity. Then you can generate a command using the CommandGenerator and you're set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the case you describe though, you don't really need to use an event to determine if the ComboBox selection changes. You can simply bind to another property in your ViewModel instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, your view ComboBox might be defined like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; &amp;lt;ComboBox ItemsSource="{Binding States}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectedItem="{Binding CurrentState}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height="25" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width="120"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By binding to the SelectedItem property, the setter on you ViewModel property (CurrentState) will get called any time the selection changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:43:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412834#M2049</guid>
      <dc:creator>JeffJackson</dc:creator>
      <dc:date>2021-12-11T18:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412835#M2050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;MVVM should be implemented in a manner that the ViewModel is unaware of the View (if you're working ViewModel first, which is, to my opinion - the best way of working since it avoids spaghetti code which i've seen on several projects).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that way you don't need to handle DataContext on xaml level which is a huge advantge since the WPF engine sometimes has some Visual tree quirks that might cause problems when looking for DataContext from the visual tree.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From my experience (after doing many projects with Prism, Caliburn.Micro(best solution)), When you try to do something that you dont have access to (manipulating view from viewmodel), that means you've reached the logical limit of your design pattern.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So don't break the design pattern.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best practice is these cases is to build your own control (or some wrapper control), create some dependency properties on it, bind to the data source on the view model, and handle changes in the data through that control, not in the VM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;best of luck.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 09:00:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412835#M2050</guid>
      <dc:creator>EladNachmias</dc:creator>
      <dc:date>2012-07-26T09:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412836#M2051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just noting that if you are working with .Net Framework 4.5, you can use MarkupExtensions with Events so you can use similar approach (CommandGenerator) with Events there. In my opinion, its about the time!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can read more from &lt;/SPAN&gt;&lt;A href="http://blogs.microsoft.co.il/blogs/pavely/archive/2012/04/07/wpf-4-5-markup-extension-for-events.aspx"&gt;http://blogs.microsoft.co.il/blogs/pavely/archive/2012/04/07/wpf-4-5-markup-extension-for-events.aspx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 05:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412836#M2051</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2012-08-02T05:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412837#M2052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In a project I'm working on we make use of pointdatasource for adding objects to a graphicslayer. However, when using pointdatasource, the resulting graphics will not contain any attribute information, making it impossible (as far as I can see) to show infowindows containing information about the objects, and also to use uniquevaluerenderer to determine which icon each graphics should have. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any workaround for this issue (i.e. is it somehow possible to add attributes to graphics when using pointdatasource)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pointdatasource seems to be the preferred way of implementing an mvvm structure using the api. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 11:10:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412837#M2052</guid>
      <dc:creator>ae</dc:creator>
      <dc:date>2012-08-07T11:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412838#M2053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not aware that using PointDataSource is the preferred way to go with MVVM since. From the experience that I have got with working mainly with Silverlight, is that you can work with Graphic's in the ViewModels with no problem and there is no need to build a lot of extra-work-a-rounds since you can bind the graphics directly. I would be interested if other peoples have different view to this topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use quite a lot of different approaches here but I have been using GraphicCollection or ObservableCollection&amp;lt;Graphic&amp;gt; that I bind directly in XAML to graphics layer. You can look how you can do that from here &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/63189-GpsLayer-and-MVVM-issues?p=220140&amp;amp;viewfull=1#post220140"&gt;http://forums.arcgis.com/threads/63189-GpsLayer-and-MVVM-issues?p=220140&amp;amp;viewfull=1#post220140&lt;/A&gt;&lt;SPAN&gt; With this kind of approach you can easily use other stuff like Task's in very mannered way from the ViewModels (or from the application services since you probably won't want to bloat your VM's code with all that stuff).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also one good way to abstract association code with the Graphics is to create custom list like in the "Using GraphicsSource Online"-example in the Samples.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt; &lt;BR /&gt;Edit:&lt;BR /&gt;Jeff Jackson kept very good tutorial to MVVM development in Developer summit. I encourage people to check it out &lt;/SPAN&gt;&lt;A href="http://video.arcgis.com/watch/1185/software-development-and-design-using-mvvm"&gt;http://video.arcgis.com/watch/1185/software-development-and-design-using-mvvm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 11:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412838#M2053</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2012-08-07T11:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412839#M2054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am not aware that using PointDataSource is the preferred way to go with MVVM since. From the experience that I have got with working mainly with Silverlight, is that you can work with Graphic's in the ViewModels with no problem and there is no need to build a lot of extra-work-a-rounds since you can bind the graphics directly. I would be interested if other peoples have different view to this topic.&lt;BR /&gt;&lt;BR /&gt;You can use quite a lot of different approaches here but I have been using GraphicCollection or ObservableCollection&amp;lt;Graphic&amp;gt; that I bind directly in XAML to graphics layer. You can look how you can do that from here &lt;A href="http://forums.arcgis.com/threads/63189-GpsLayer-and-MVVM-issues?p=220140&amp;amp;viewfull=1#post220140"&gt;http://forums.arcgis.com/threads/63189-GpsLayer-and-MVVM-issues?p=220140&amp;amp;viewfull=1#post220140&lt;/A&gt; With this kind of approach you can easily use other stuff like Task's in very mannered way from the ViewModels (or from the application services since you probably won't want to bloat your VM's code with all that stuff).&lt;BR /&gt;&lt;BR /&gt;Also one good way to abstract association code with the Graphics is to create custom list like in the "Using GraphicsSource Online"-example in the Samples.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt; &lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt; &lt;BR /&gt;Edit:&lt;BR /&gt;Jeff Jackson kept very good tutorial to MVVM development in Developer summit. I encourage people to check it out &lt;/SPAN&gt;&lt;A href="http://video.arcgis.com/watch/1185/software-development-and-design-using-mvvm"&gt;http://video.arcgis.com/watch/1185/software-development-and-design-using-mvvm&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Antti, and thanks for your reply! I was probably wrong when saying that PointDataSource was the preferred way to go with mvvm in the API. I got this impression when I read the following description on the api web site: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The PointDataSource class provides the implementation necessary to easily bind to items with attributes that reference location using X and Y values. This functionality caters to the use of Model View ViewModel (MVVM) design patterns. In general, the view (user interface [UI]) can bind to data (model) via a view-model, implemented in code-behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I will go for using a graphiccollection instead, this seems to be a much better approach &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks again for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 06:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412839#M2054</guid>
      <dc:creator>ae</dc:creator>
      <dc:date>2012-08-08T06:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412840#M2055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been following this post since a long time and saw the examples above. It is really great work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However from what I perceive of MVVM, my viewmodel should actually be totally unaware of the view. While when I try to implement the same in ESRI's SDK for WPF, it makes me use instance of Map in the ViewModel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has someone found a way to create a viewmodel that does not include a reference to ESRI? This somehow is the first requirement for the application I am developing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2013 09:55:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412840#M2055</guid>
      <dc:creator>AnkitaBhatia</dc:creator>
      <dc:date>2013-04-01T09:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412841#M2056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I have been following this post since a long time and saw the examples above. It is really great work.&lt;BR /&gt;However from what I perceive of MVVM, my viewmodel should actually be totally unaware of the view. While when I try to implement the same in ESRI's SDK for WPF, it makes me use instance of Map in the ViewModel.&lt;BR /&gt;&lt;BR /&gt;Has someone found a way to create a viewmodel that does not include a reference to ESRI? This somehow is the first requirement for the application I am developing.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt; &lt;STRONG&gt;You can always delegate more work (through indirections) to the View.&lt;/STRONG&gt;&lt;/LI&gt;&lt;BR /&gt;Make a MapViewModel for what is bindable and for anything that isn't you can: &lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt; listen for custom VM events/propertychanges in the View that tells it , indirectly, what to do with the Map.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt; similarly but with the use of attached properties like &lt;A href="https://github.com/dotMorten/WinStore-Routing-Sample/blob/master/src/RoutingSample/CommandBinder.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt; where a property change event&lt;/LI&gt;&lt;BR /&gt;is used to indirectly signal a ZoomTo call on the Map through an AttachedDP. This reminds me a bit of&lt;BR /&gt;&lt;A href="http://www.codeproject.com/Articles/269364/MVVM-PRISM-Modal-Windows-by-using-Interaction-Requ" rel="nofollow noopener noreferrer" target="_blank"&gt;Prism's InteractionRequest&lt;/A&gt; trick which essentially is a Action Triggered by a property change&lt;BR /&gt;&lt;/OL&gt;&lt;LI&gt;Another solution might be to make you own custom wrapper control (MapControl) that this time IS bindable.&lt;/LI&gt;&lt;BR /&gt;You are free to design the interface of the control and therefore how its ViewModel will look like. This is &lt;BR /&gt;btw similar to what &lt;STRONG&gt;had&lt;/STRONG&gt; to be done by all WinPhone devs to bypass the fact that the &lt;BR /&gt;ApplicationBar control on WinPhone is not bindable!! They made a bindable wrapper.&lt;BR /&gt;&lt;LI&gt;Another solution is to embrace the fact that not everything can and will be bindable and use a hybrid approach which&lt;/LI&gt;&lt;BR /&gt;I am very fond off called &lt;A href="http://martinfowler.com/eaaDev/PresentationModel.html" rel="nofollow noopener noreferrer" target="_blank"&gt;PresentationModel&lt;/A&gt;, which is essentially the parent of MVVM (think bindable Presenter), along with the option of having a interface for the View. &lt;BR /&gt;An elegant way of setting this up is similar to how &lt;A href="https://developers.google.com/web-toolkit/" rel="nofollow noopener noreferrer" target="_blank"&gt;GWT&lt;/A&gt; does it :&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
public class PresentationModel
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; public interface View 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void ZoomTo(Geometry geom);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; public View View {get; set;}
}
&lt;/PRE&gt; &lt;BR /&gt;&lt;LI&gt; Now, if all these seem to be too much work then...&lt;/LI&gt;&lt;BR /&gt;If you find that going pure MVVM is too much of a hassle in some cases then I personally don't mind&lt;BR /&gt;making a wrapper ViewModel (think MapViewModel that wraps the Map). I know it breaks "rules" &lt;BR /&gt;but I can get the job done whilst respecting the MVVM goal and retaining the fundamental benefits.&lt;BR /&gt;It's going to look, feel and smell like a VM but in reality it wont bind to anything.&lt;BR /&gt;This way I still code against a ViewModel, I can mock it, test code that uses it etc etc. &lt;BR /&gt;1) I keep the benefits of using a ViewModel, &lt;BR /&gt;2) I have the flexibility of changing the interface I code against completely if I wish so. For example I could provide a LocationViewModel (or DrawViewModel) off the MapViewModel to simulate the new Map.LocationDisplay coming in the WinStore and WP8 instead of dealing with a GpsLayer (WP7/WPF API) thus making my code more portable also (since I can hide some API differences behind my interface)..&lt;BR /&gt;3) You have less to worry about concerning trying to workaround the non-bindable scenarios.&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:43:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412841#M2056</guid>
      <dc:creator>AnargyrosTomaras</dc:creator>
      <dc:date>2021-12-11T18:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412842#M2057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Keith,&lt;BR /&gt;&lt;BR /&gt;If you want to wire up a method on your ViewModel to some arbitrary event, then you need to use something like the InvokeCommandAction which is defined in System.Windows.Interactivity. Then you can generate a command using the CommandGenerator and you're set.&lt;BR /&gt;&lt;BR /&gt;In the case you describe though, you don't really need to use an event to determine if the ComboBox selection changes. You can simply bind to another property in your ViewModel instead.&lt;BR /&gt;&lt;BR /&gt;For example, your view ComboBox might be defined like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; &amp;lt;ComboBox ItemsSource="{Binding States}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectedItem="{Binding CurrentState}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height="25" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width="120"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;By binding to the SelectedItem property, the setter on you ViewModel property (CurrentState) will get called any time the selection changes.&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;Jeff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;your MVVM session has been a great starting point for me. I have been working on similar functionality where Listbox needs be multi-selectable. Upon research, I figured that 'SelectedItems' property is not 'bindable' with view. Is there any MVVM way of doing this ?.I need to zoom to the results selected in Listbox. Your quick response will be greatly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412842#M2057</guid>
      <dc:creator>RogerF</dc:creator>
      <dc:date>2021-12-11T18:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412843#M2058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Federer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can introduce a boolean IsSelected property in your List ViewModels and Two-Way bind them to the IsSelected DP property of the generated ListBoxItem's.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the XAML part :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;ListBox ItemsSource="{Binding ItemVMs}"&amp;gt;
&amp;nbsp; &amp;lt;ListBox.ItemContainerStyle&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Style TargetType="{x:Type ListBoxItem}"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Style&amp;gt;
&amp;nbsp; &amp;lt;/ListBox.ItemContainerStyle&amp;gt;
&amp;lt;/ListBox&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412843#M2058</guid>
      <dc:creator>AnargyrosTomaras</dc:creator>
      <dc:date>2021-12-11T18:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412844#M2059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="color: #3e3e3e; font-family: Arial;"&gt;As &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;atomaras said, that solution works quite well in most of the scenarios. Just check that UIVirtualization is support is ok for your needs.&lt;BR /&gt;&lt;BR /&gt;Simplest solution is to create codebehind event handler and then direct selection to viewmodel from there. Yes, it's code in the codebehind but in this kind of scenarios it is ok. I use this solution if I'm lazy and want fast results. &lt;BR /&gt;&lt;BR /&gt;One solution is to create attached property that encapsulates that but that needs a bit more testing. This was found with fast googling &lt;BR /&gt;&lt;/SPAN&gt;&lt;A href="http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html"&gt;http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html&lt;/A&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&lt;BR /&gt;&lt;BR /&gt;(side note, if you guys are coming to DevSummit to Palm Springs this year, I would love to have a chat about MVVM and how you do it).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 07:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412844#M2059</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-02-25T07:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: MVVM - View and ViewModel Problems</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412845#M2060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;MVVM Light!~&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 16:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/mvvm-view-and-viewmodel-problems/m-p/412845#M2060</guid>
      <dc:creator>BrianLocke</dc:creator>
      <dc:date>2014-02-28T16:35:49Z</dc:date>
    </item>
  </channel>
</rss>

