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

New Post: How to register view/viewmodel in castle.windsor for use in prism navigation

$
0
0

Hi,

Based on my understanding a possible approach to register your views in Windsor against the Object type could be for example like this:

windsorContainer.Register(Castle.MicroKernel.Registration.Component.For(typeof(object))
.ImplementedBy(typeof(yourView)).Named("yourView").LifeStyle.Singleton); //The defined LifeStyle will deppend on your requirements

For more information about the different registration methods used by Windsor you could check the following resource:

On the other hand, take into account that the Prism library accesses the container through theIServiceLocator interface, hence if you want to use Prismwith a container other than Unity or MEF in your application you will need to write a Service Locator adapter for your container and also need to write a container-specificbootstrapper class. This is mentioned in the Extending Prism Chapter of the Prism documentation.

If you need further assistance please let us know,

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>