title: WPF Design Time View Model
body: <p>I have a simple view model that has a list of Units in it, this shows fine in run time, but I would like the list to show in design time.  As per some questions around I have tried the following, but it is not working, can someone please help?</p>
  
  <pre><code>//In resources
  &lt;local:MainViewModel x:Key="DesignViewModel"/&gt;
  </code></pre>
  
  <p>The Presenter</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Units}" d:DataContext="{Binding Source={StaticResource DesignViewModel}}" Background="Transparent"&gt;
  </code></pre>
  
  <p>The view model</p>
  
  <pre><code>    public MainViewModel()
      {
          Units = new ObservableCollection&lt;UnitViewModel&gt;();
          Units.Add(new UnitViewModel
          {
              ID = "1",
              Degrees = "80",
              IsMaster = true
          });
          for (int i = 0; i &lt; 10; i++)
              Units.Add(new UnitViewModel
              {
                  ID = "2",
                  Degrees = "40",
                  IsMaster = false
              });
      }        
  }
  </code></pre>