Hi All,
I am using Prism 4.1 and WPF MVVM as my base app platform. I have a login window with a busy indicator control. I am using BackgroundWorker class so that user can see the busy indicator when prism is loading all modules.
code snippets look like below:
I also tried Application.Current.Dispatcher.BeginInvoke to run Bootstrapper but no luck.
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new LoginDelegate(Login));
I am using Prism 4.1 and WPF MVVM as my base app platform. I have a login window with a busy indicator control. I am using BackgroundWorker class so that user can see the busy indicator when prism is loading all modules.
code snippets look like below:
var backgroundWorker = new BackgroundWorker();
backgroundWorker.DoWork += OnBackgroundWorkerDoWork;
backgroundWorker.RunWorkerAsync();
public void OnBackgroundWorkerDoWork(object sender, DoWorkEventArgs e)
{
Bootstrapper bootstrapper = new Bootstrapper();
bootstrapper.Run();
}
However, when the bootstrapper is running, the login window is frozen. Why? how to work around this? I also tried Application.Current.Dispatcher.BeginInvoke to run Bootstrapper but no luck.
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new LoginDelegate(Login));