문제

How to implement DI and IoC in Win8 App? In windows form if I needed a form with dependencies I passed in the constructor (Constructor Injection) But with Page how do you? If I build a page with this constructor (

HomePage myPage = new HomePage (MyService1 ms, MyService2 ms)) 

then the

Navigate (typeof (HomePage)) 

how can I pass arguments?

도움이 되었습니까?

해결책

You can solve the problem using the Content of Frame instead of Source :

myFrame.Content = new HomePage (MyService1 ms, MyService2 ms);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top