Pergunta

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?

Foi útil?

Solução

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

myFrame.Content = new HomePage (MyService1 ms, MyService2 ms);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top