title: MVVMLight ViewModelLocator on a UserControl
body: <p>Is it possible to use the MVVMLight ViewModelLocator on a UserControl.
  I have added it to my user control in the same way as is done on the MainWindow, but i get an error/popup in VS2010 stating "Cannot find resource named 'Locator'. Resource names are case sensitive."</p>
  
  <p>Has anyone tried this?</p>
  
  <p>Code i have thus far is pretty much a standard MVVMLight WPF starter application...</p>
  
  <p><strong>UserControl</strong></p>
  
  <pre><code>&lt;UserControl x:Class="NavTest3.PersonControl"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           Height="116" MinWidth="250" Width="300"
           DataContext="{Binding Person, Source={StaticResource Locator}}"
           &gt;
  
  &lt;!----&gt;
  &lt;UserControl.Resources&gt;
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="Skins/MainSkin.xaml" /&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>App.xaml contains..</p>
  
  <pre><code>&lt;Application.Resources&gt;
      &lt;!--Global View Model Locator--&gt;
      &lt;vm:ViewModelLocator x:Key="Locator"
                           d:IsDataSource="True" /&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p>so the issue is with setting "DataContext="{Binding Person, Source={StaticResource Locator}}" on the userControl."</p>
  
  <p>As mentioned, doing this will mean every instance of this user control will share the same ViewModel, but I want to start with understanding this issue before moving on.. </p>