title: Open View for Selected ViewModel
body: <p>I'm struggling to find the right way to do this. I have a <code>MyCollectionViewModel</code> which contains an observable collections of <code>MyViewModel</code>. I have this bound to a view <code>MyCollectionView</code> with the selection of an item bound back to a command in <code>MyCollectionViewModel</code> called <code>OpenMyViewCommand</code>. So far so good: </p>
  
  <pre><code>    private MvxCommand&lt;MyViewModel&gt; _openMyViewCommand;
      public ICommand OpenMyViewCommand
      {
          get {
              _openMyViewCommand= _openMyViewCommand?? new MvxCommand&lt;MyViewModel&gt;(OpenMyView);
              return _openSubViewCommand;
          }
      }
  </code></pre>
  
  <p>Now when I touch one of the items on my list view it will fire the command and call the method <code>OpenMyView</code> passing the selected <code>MyViewModel</code> to the method. Now the problem is that no matter what I try, I can seem to get <code>ShowViewModel</code> to display the view for the selected model. I've tried various things, but intuitively, I would have expected something really simple like this to work:</p>
  
  <pre><code>    private void OpenMyView(MyViewModel item) {
                  ShowViewModel&lt;MyViewModel &gt; (item);
      }
  </code></pre>
  
  <p>But, of course, it doesn't. I get errors that look like this:</p>
  
  <pre><code>013-06-10 10:46:05.849 MyAppIPhoneUI[51198:c07] mvx: Warning:   5.83 Problem creating viewModel of type MyViewModel - problem MvxException: Failed to resolve parameter for parameter model of type MyModel when creating MyApp.Core.MyViewModel
  at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.GetIoCParameterValues (System.Type type, System.Reflection.ConstructorInfo firstConstructor) [0x00042] in /MvvmCross-3/CrossCore/Cirrious.CrossCore/IoC/MvxSimpleIoCContainer.cs:377 
  at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.IoCConstruct (System.Type type) [0x00030] in /MvvmCross-3/CrossCore/Cirrious.CrossCore/IoC/MvxSimpleIoCContainer.cs:266 
  at Cirrious.CrossCore.Mvx.IocConstruct (System.Type t) [0x00006] in /MvvmCross-3/CrossCore/Cirrious.CrossCore/Mvx.cs:115 
  at Cirrious.MvvmCross.ViewModels.MvxDefaultViewModelLocator.TryLoad (System.Type viewModelType, IMvxBundle parameterValues, IMvxBundle savedState, IMvxViewModel&amp; viewModel) [0x00004] in /MvvmCross-3/Cirrious/Cirrious.MvvmCross/ViewModels/MvxDefaultViewModelLocator.cs:27 
  
  013-06-10 10:24:11.330 MyAppIPhoneUI[50878:c07] mvx: Warning:   6.87 Exception masked MvxException: Failed to load ViewModel for type MyApp.Core.MyViewModel from locator MvxDefaultViewModelLocator
    at Cirrious.MvvmCross.ViewModels.MvxViewModelLoader.LoadViewModel (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest request, IMvxBundle savedState, IMvxViewModelLocator viewModelLocator) [0x00023] in /MvxViewModelLoader.cs:46 
  </code></pre>
  
  <p>Any idea what's going on here? I have a <code>MyView</code> class that inherits from MvxViewController, but it doesn't get loaded.</p>