I have an Prism application that begins with a Splash screen, then needs to change to a Start view. Here is the code for the Initialize method of the module I hoped would accomplish this:
public void Initialize() {
RegisterViewsAndServices();
//_manager.RegisterViewWithRegion(RegionNames.Content, typeof(ToolboxSplashView));
var vmSplash = _unityContainer.Resolve<IToolboxSplashViewModel>();
IRegion region = _regionManager.Regions[RegionNames.Content];
region.Add(vmSplash.View);
var vmStart = _unityContainer.Resolve<IToolboxStartViewModel>();
region.Deactivate(vmSplash.View);
region.Add(vmStart.View);
}
Unfortunately, when I run this I only see the Start view. If I comment out the Start view (last paragraph of the code), I see the start screen and the animation. How do I detect that the animation has completed and then change from Splash view to Start view?
Thanks.
Just a thought, use an AggregateEvent to announce that the animation has completed and have your controlling class execute the second part of your code when it receives that aggregate event notification.