From the code in the link getting an error on this line
this.Invoke(new DisplayInfoDelegate(DisplayStatus),
String.Format("Ready(last error: {0}", ex.Message));
Yes I get that Invoke is not WPF.
This sample is from Forms and I cannot find a WPF sample.
What do I need to modify to make this work in WPF?
SqlCommand.BeginExecuteNonQuery Method (AsyncCallback, Object)
Any UI manipulation must be performed in UI thread. So you should marshal the delegate.
It can be Dispatcher.Invoke or Dispatcher.BeginInvoke.
The same can be done with the tasks. Here is the example: http://www.albahari.com/threading/part5.aspx#_Task_Schedulers_and_UIs