title: RunAsync - How do I await the completion of work on the UI thread?
body: <p>When awaiting <code>Dispatcher.RunAsync</code> the continuation occurs when the work is scheduled, not when the work has completed. How can I await the work completing?</p>
  
  <p>Edit</p>
  
  <p>My original question assumed the premature continuation was caused by the design of the API, so here's the real question.</p>
  
  <p>When awaiting <code>Dispatcher.RunAsync</code> using an asynchronous delegate, using <code>await</code> within the delegate's code, the continuation occurs when the <code>await</code> is encountered, not when the work has completed. How can I await the work completing?</p>
  
  <p>Edit 2</p>
  
  <p>One reason you may need to dispatch work that's already on the UI thread is to workaround subtle timing and layout issues. It's quite common for values of sizes and positions of elements in the visual tree to be in flux and scheduling work for a later iteration of the UI can help.</p>