Answer the question
In order to leave comments, you need to log in
WPF: how to properly insert a view into another view with dependency di initializations?
Child view has a view constructor
View1(IViewModel model)
{
DataContext=model;
InitializeComponent();
}
Answer the question
In order to leave comments, you need to log in
Constructors with parameters have x:Arguments and x:FactoryMethod attributes . But unity won't help here.
There is such an option for using a container - dotnetninja.wordpress.com/2010/02/23/ioc-inversion... , but keep in mind that here the container is used as a Service Locator .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question