title: Significance of declaring a WPF event handler as 'async' in C# 5
body: <p>Imagine a WPF code-behind event handler:</p>
  
  <pre><code>&lt;Button Click="OnButtonClick" /&gt;
  </code></pre>
  
  <p>In C# 4 you would declare your handler as:</p>
  
  <pre><code>private void OnButtonClick(object sender, RoutedEventArgs e) { ... }
  </code></pre>
  
  <p>In C# 5 you can declare an <code>async</code> handler</p>
  
  <pre><code>private async void OnButtonClick(object sender, RoutedEventArgs e) { ... }
  </code></pre>
  
  <p>So what is WPF doing with this? A few minutes of searching about didn't turn anything up.</p>
  
  <p>It seems that it's possible to perform UI updates after <code>await</code> statements. Does this imply that the task is continued on the Dispatcher thread?</p>
  
  <p>If the <code>Task</code> raised an error, would it be raised through the WPF <code>Dispatcher</code>, or only via the <code>TaskScheduler</code>?</p>
  
  <p>Are there any other interesting aspects to this that might be nice to understand?</p>