Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Getting the deafult window

$
0
0

Hi,

Based on my understanding defining the default window in a module may not be a recommended approach as by default thePrism initialization process initializes the shell before initializing the modules (Chapter 2: Initializing Prism Applications), in which case this will cause a timing issue if your modules are loosely coupled as you won't be able to resolve the window until the corresponding module is initialized.

On the other hand, in the sample you posted this scenario could be only possible because your main project has a reference to your modules' project, hence this will allow you to register and resolve the window before initializing the modules. The problem with this approach is that any other module you have will be dependent of this module, in which case defining this window in the main project makes more sense.

Also, one thing I notice in your application is that the bootstrapper.run method is not being called in yourApp.Xaml file, which will be required to start the initialization process. For example you App.xamlcode behind could look like this:

 

publicpartialclass App : Application
    {protectedoverridevoid OnStartup(StartupEventArgs e)
        {base.OnStartup(e);
            Bootstrapper bootstrapper = new BootStrapper();
            bootstrapper.Run();
        }
    }
}

I hope you find this handy,

 

Agustin Adami
http://blogs.southworks.net/aadami


Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>