title: How can I force the creation of an object declared in the resources
body: <p>I am declaring an object in XAML (in my UserControl.Resources section) as follows:</p>
  
  <pre><code>&lt;vm:ErrorDisplayService x:Key="EDSvc"/&gt;
  </code></pre>
  
  <p>The constructor of my object is not being called.</p>
  
  <p>I am able to get it to work if I put a dummy object in like this:</p>
  
  <pre><code>&lt;TextBlock Visibility="Collapsed" Text={StaticResource EDSvc}/&gt;
  </code></pre>
  
  <p>but this seems to be a hack to me.</p>
  
  <p>Is there a cleaner way to do this?</p>
  
  <p>JAB</p>