WPF calls not working during long method processing
- by Colin Rouse
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…