My app needs to load a usercontrol in the MainWindow on startup.
However the initialization of the usercontrol is slow. (not because of loading business data, I already separate the UI from business layer)
What I want to do is while waiting for the initialization of the usercontrol, a busy indicator will appear and will disappear when the initialization of the usercontrol is finished.
Right now I have a IsBusy property in the MainViewModel and is databind to the busyindicator in the MainWindow.
The child usercontrol is displayed via a contentcontrol.
presenter.Content = new ChildUserControl();
//presenter is the contentcontrol in MainWindow
However, how to run both the initialization and the display of busy indicator simultaneously? It seems that I need different threads to handle this issue.
However, running the initialization on a different thread while letting the main UI thread display the busy indicator will not work, since a child control in another thread cannot be placed within its parent control, which in this case is the MainWindow.
Any ideas on that?