title: Getting UI dispatcher in class library
body: <p>I'd like to design a class library and plan to use mutli-threading (i.e. <code>BackgroundWorker</code>). I will have to watch out for the thread context, from which updates are made for fields, if I plan to bind them to the GUI of the library consuming frontend. It's not a good idea to pass the reference of the GUI dispatcher to the library, as I read. But how can I get access to the dispatcher of the application that will use the library? Is this possible?</p>
  
  <p>I tried <code>Application.Current.Dispatcher</code> and added a reference to <code>WindowBase</code> (as I didn't have the possibility to add <code>System.Windows</code>), but still can't resolve the dispatcher object.</p>