In my application I'm using the idle-time of the UI thread to offload expensive operations as described by MSDN article on the WPF Threading Model.
GenerateDataAction = () => { GenerateData(); };
Dispatcher.BeginInvoke(GenerateDataAction, DispatcherPriority.Render, null);
In the GenerateDate()
method I access an MSSQL database, process the data in, and update bindings on the viewmodel. I have noticed since implementing this that some binding fail to update properly or not at all. I have check the output for binding errors and had a second programmer confirm the logic, also have set breakpoints within the dependency property changed method (the breakpoints do not get hit).
Is there any best-practice advice on which DispatcherPriority
(link to MSDN) should be used when the invoked action contains bindings?