Hi, The following method does not apply the wpf changes (background = red) until the 2nd method (DoWork) exits:
private void change()
{
Background = Brushes.Red;
Dispatcher.BeginInvoke((Action) DoWork);
}
DoWork() takes several seconds to run and I don't really want to put it into a thread, as this code will be used in several places and will probably interact will the Dispatcher thread at various intervals. I've tried calling the Invalidate...() methods, but to no avail. The BeginInvoke() was added to see if the delay would allow the background change to be applied before the logic was called. Typically, the logic would be part of this method. Btw, most of the logic is performed on a different thread and shouldn't block the Dispatcher thread?!
Can someone please help? Thanks