Hi, in .NET 4.0 WPF app, I have to force refresh a label status in between database queries.
(update label, run a sql query, update lable, run a sql query, ...)
private delegate void MyDelegate();
private static void Refresh(DependencyObject obj)
{
obj.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Loaded, (MyDelegate)delegate { });
}While the documentation says that 'Loaded' has higher priority than 'ApplicationIdle', I noticed that setting to 'ApplicationIdle' force refreshes more consistently than 'Loaded' or 'Render'
Why?
Thanks,
-srinivas y.
sri