title: Dispatcher.Invoke with anonymous delegate works in Silverlight but not WPF
body: <p>In Silverlight 4 I have a custom service class which has an asynchronous Completed event.  Inside the Completed event I take the returned data and invoke a populate method via something like this:</p>
  
  <pre><code>private void service_Completed(object sender, CompletedEventArgs args)
  {
      Dispatcher.BeginInvoke(() =&gt; populateInbox(args.Jobs));
  }
  
  private void populateInbox(List&lt;JobViewModel&gt; jobs)
  {
      inbox.DataContext = jobs;
  }
  </code></pre>
  
  <p>The <code>BeginInvoke</code> works in SL4, however when I ported it to WPF I get the following error:</p>
  
  <blockquote>
    <p>Cannot convert lambda expression to type 'System.Delegate' because it is not a delegate type</p>
  </blockquote>
  
  <p>I tried changing it to an in-line, anonymous, paramaterized delegate:</p>
  
  <pre><code>Dispatcher.BeginInvoke(delegate(List&lt;JobViewModel&gt; jobs)
  {
      inbox.DataContext = jobs;
  });
  </code></pre>
  
  <p>However, that yields the same compile-time error.</p>
  
  <p>Any idea how to get this to work in WPF? Refactoring to use the <code>BackgroundWorker</code> is not an option for me.</p>