SplashScreen

Topics: Questions
May 29, 2013 at 8:56 AM
Edited May 29, 2013 at 8:57 AM
Hello.

I need an Splash Screen and looked at the help of SplashScreenService. But its not realy clear for me. Is there an example?

Is it correct: The SplashScreenService have do to the startup actions?
splashScreenService.Enqueue(new ActionTask("Starting application", OnStartApplication));
private static void OnStartApplication(ITaskProgressTracker obj)
{
      // Do startup actions?
}
Why?

A SplashScreen only have to show informations at startup.

Is it not better do send only messages to the splashscreen?
Coordinator
Jun 1, 2013 at 10:13 PM
There are a few reasons why we are passing the actions to the splash screen.

1) It automatically takes care of threading dispatching
2) It automatically knows how much tasks are involved (thus can control the progress for you)
3) It automatically updates the status text per action

Another option would be to manually send messages to some "magic" instance or update it manually each step. However, we thought it was a good idea to wrap initialization actions into ActionTask objects and pass them along.

I think the prism extension uses the splash screen so you can find an example there.
Jun 3, 2013 at 10:04 AM
Ok.

Lets try to explain my problem:

In an viewmodel there is an property. When this property changed I do a lot of thinks and so I show the PleasewaitService.
At Startup this Property is changed the first time. At this time I don't want to show the PleasewaitService.
I wan't to show a Splashscreen at this time. And get noticed wenn the Action of the property changed is ready. The notice I can do for examle with the Auditor.

But how to create the viewmodels before showing the mainwindow?

Order:
  1. Create and Show my SplasScreen.
  2. Create the MainWindow. (some bootstrapps will be done)
    3.Get notice with auditor when the special viewmodel is created and the property is changed.
    -> Here is the problem. The viewmodels only created after the MainWindow is Show.
  3. Show the Mainwindow (here the viewmodels will be created, but thats to late)
  4. Close the Splashscreen.