I am trying to update a progressbar using the dispatcher but somehow cannot think where to place the dispatcher.Invoke and what to pass inside it.
Im trying to impor
If you are trying to update the UI from some non-UI thread you can do something like this..
//here progress bar is a UIElement
progressBar.Dispatcher.BeginInvoke(
System.Windows.Threading.DispatcherPriority.Normal
, new DispatcherOperationCallback(delegate
{
progressBar1.Value = progressBar1.Value + 1;
//do what you need to do on UI Thread
return null;
}), null);
This code is taken from a good post about updating UI from background thread