+3  A: 

You need to specify an explicit delegate type. Just use an Action.

Dispatcher.BeginInvoke(new Action(() => populateInbox(args.Jobs));

You could, however, avoid having to close over the args.Jobs value like this:

Dispatcher.BeginInvoke(new Action((jobs) => populateInbox(jobs)), jobs);

This is because the single-parameter version of Dispatcher.BeginInvoke has a different signature in Silverlight than in WPF. In Silverlight, it takes an Action, which allows the C# compiler to implicitly type your lambda as an Action. In WPF, it takes a Delegate (like its Control.BeginInvoke analog in Winforms), so the C# compiler has to have a delegate type explicitly specified.

Adam Robinson
I'm getting this error now: An object reference is required for the non-static field, method, or property 'System.Windows.Threading.Dispatcher.BeginInvoke(System.Delegate, params object[])'.I separated it out into 2 lines to try and see what is causing the error. var d = new Action(() => populateInbox(args.Jobs)); Dispatcher.BeginInvoke(d, args.Jobs); Error happens on the 2nd line.
Edward J. Stembler
Dispatcher.BeginInvoke(d, new object[] { args.Jobs }); Does not work either.
Edward J. Stembler
@Edward: `Dispatcher` is not a static class. You'll have to call this function either within the context of a UI element that has a `Dispatcher` property, or you'll have to pass in the dispatcher as another argument.
Adam Robinson
@Adam Yeah, you're right. I'm trying to use a WPF user control from within an Excel workbook project. The WPF user control is hosted in an ActionPane with an ElementHost. The pane is instantiated in a Ribbon control which does not have a Dispatcher property. Thanks.
Edward J. Stembler