开发者

Inject dependencies from Application into each new PhoneApplicationPage

My Application o开发者_StackOverflow中文版bject owns object X. Whenever instances of PhoneApplicationPage are created, I want to inject a reference to X into them. Where can I plug in to do that?

The best way I've found so far is to use the RootFrame.Navigated event, but that of course executes upon each navigation, not only when the page objects are created.


Have a look at:

http://funq.codeplex.com/

https://msmvps.com/blogs/vcsjones/archive/2010/11/25/a-really-super-light-and-simple-ioc-container-for-windows-phone-7.aspx

http://www.simonrhart.com/2010/03/implementing-ioc-container-in.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜