title: WPF access GUI from other thread
body: <p>I am working through the requirement to make a WPF Application single instance only.
  However - I have to pass the command line to the first instance and then perform some UI action.</p>
  
  <p>I am using a Mutext to check for already running instances, I do use NamedPipes to transfer the command line to the already running instance.</p>
  
  <p>But of course I am not in the correct Thread to access "Window1". 
  I tried to store a reference to "Window1" in a static class and then use the Dispatcher to call a Method in "Window1", however, as soon as I try to access a variable (class wide scope in "Window1") I receive a "Object reference not set to an instance of an object."</p>
  
  <p>The UI Action is to add a new Tab to a TabControl - during initialization of the new Tab some work is done - and the variables are initialized and even the method I want to call works during the init - but when called from the Dispatcher it fails.</p>
  
  <p>Any hints, how to do this? Am I on the wrong track here?</p>
  
  <p>Thanks!</p>