We are using MVVM pattern at work for a window that fetches data from a web service and then displays the data. The data is displayed in tabs where each tab displays a title (string) and a chart (image). There are four tabs and whatever tab that is selected
to be displayed first fails to display the image. The title gets displayed and this happens asyncrhonously so you will see no title and then when NotifyPropertyChanged fires you see the title but not the image. All the tabs that are not displayed by default
work as expected and show the image. And you can change which tab is not displayed and the new tab that is displayed by default will also fail to show the image.
Any help greatly appreciated.
The code as it is shown below works. However whenever I try and use the ThreadPool to GetNineMonthsOptionData the image for that tab doesn't display. Another interesting thing is that if I use the thread pool and then put a Thread.Sleep(2000) call right after
it works. So there seems to be a race condition at work here.
public void LoadOption(string symbol)
_symbol = symbol;
// TODO: Team A - Change to use background thread for ninemonth data also and determine
// if dispatching is necessary
// (o) =>
View Complete Post