Hi Brian
Have a look at MPF frameworks like Caliburn micro. They usually provide support for IoC containers.
http://caliburnmicro.codeplex.com/http://caliburnmicro.codeplex.com/discussions/230861
Remo
a. Create a class called ServiceLocator, like so...
public class ServiceLocator
{
private static IKernel kernel_;
static ServiceLocator()
{
kernel_ = new StandardKernel(< your module>)
}
}
b. Then in App.xaml, create a resource called ServiceLocator
<xxxx:ServiceLocator x:Key="ServiceLocator"
d:IsDataSource="True" />
c. Then wire up the correct view model in your XAML like so:
DataContext="{Binding YourViewModel, Source={StaticResource
ServiceLocator}}", where "YourViewModel" is a static property on the
ServiceLocator class.
2. If you are using MvvMLight, you can replace the service locator with your
own implementation as described above.
3. Caliburn.Micro has facilities for plugging in any IoC you like.
HTH,
Michael
Hey there,
Thanks
--
You received this message because you are subscribed to the Google Groups
"ninject" group.
To post to this group, send email to nin...@googlegroups.com.
To unsubscribe from this group, send email to
ninject+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/ninject?hl=en.