IoC and Design Time

Posted by benPearce on Stack Overflow See other posts from Stack Overflow or by benPearce
Published on 2010-04-19T21:23:22Z Indexed on 2010/04/20 6:53 UTC
Read the original article Hit count: 419

Filed under:
|
|

I have a WPF application which I am using to learn MVVM and IoC.

The problem is that the Model used by one of the Views expects to pull one of its dependancies in the constructor from an IoC container.

When working on this View in the Visual Studio designer it cannot show the design because an exception is being raised in the model.

Is there a way around this? Am I pulling my dependancies in the wrong place in code or is there a way I can pass in constructed dependancies, perhaps through Constructor injection.

At present the IoC container is setup in code in App.xaml.cs.

The IoC container is a roll-your-own taken from this article on MSDN - http://msdn.microsoft.com/en-us/magazine/cc337885.aspx

© Stack Overflow or respective owner

Related posts about ioc-container

Related posts about design-time