title: Binding View to ViewModel in xaml throws error "Cannot create an instance of"
body: <p>I am new to the MVVM model, so I would like some advice. </p>
  
  <p>Description:
  Building a MVVM sample WPF application which reads the data from SQL table and displays them in a view. View uses WPFToolkit:grid to display the results. Application runs fine and able to show the result in grid. The application is developed using VS2010.</p>
  
  <p>PeopleListView--> Display the results </p>
  
  <pre><code>&lt;UserControl.DataContext&gt;
      &lt;vm:PeopleViewModel/&gt;
  &lt;/UserControl.DataContext&gt;
  &lt;WpfToolkit:DataGrid ItemsSource="{Binding Path=GetAllItems}"  AutoGenerateColumns="False" 
      Name="WpfGrid" Margin="0,0,28,0" Width="301"&gt;
      &lt;WpfToolkit:DataGrid.Columns&gt;
          &lt;WpfToolkit:DataGridTextColumn Header="Identifier" Width="Auto" Binding="{Binding Path=Id}"/&gt;
          &lt;WpfToolkit:DataGridTextColumn Header="Description" Width="Auto" Binding="{Binding Path=Name}"/&gt;
          &lt;WpfToolkit:DataGridTextColumn Header="Create Date" Width="Auto" Binding="{Binding Path=CreateDate}"/&gt;
      &lt;/WpfToolkit:DataGrid.Columns&gt;
  &lt;/WpfToolkit:DataGrid&gt;
  </code></pre>
  
  <p>PeopleViewModel--> </p>
  
  <pre><code>class PeopleViewModel
  {
      PeopleRepository _Repository;
  
      public PeopleViewModel()
      {
          _Repository = new PeopleRepository();
      }
  
          public IEnumerable&lt;Person&gt; GetAllItems
          {
              get { return _Repository.GetAllItems(); }
          }
  }
  </code></pre>
  
  <p>PeopleRepository--> Model class uses Entity Framework to get all the rows from DB.</p>
  
  <pre><code>class PeopleRepository 
  {
      MyEntities _Context;
  
      public PeopleRepository()
      {
          _Context = new MyEntities();
      }
  
      public IEnumerable&lt;Person&gt; GetAllItems()
      {
          return _Context.People;
      }
  
  }
  </code></pre>
  
  <p>MyEntities created using Entity Framework Model.</p>
  
  <p>App.Config has the connection string created by the Entity Framework model.</p>
  
  <p>In Vstudio design mode, the view user control throws error: ArgumentException was thrown on "PeopleViewModel": Cannot create an instance of "PeopleViewModel".</p>
  
  <p>Error shown at line </p>
  
  <pre><code>    &lt;vm:PeopleViewModel/&gt;
  </code></pre>
  
  <p>Any help appreciated. Thanks</p>