So that the Visual Studio designer calls the dependency injection container instead of using the default constructor when showing the GUI of a XAML file
CodePudding user response:
No, I don't think so, but you should be able to use the GetIsInDesignMode property to detect whether you're in design mode and set up your dependencies accordingly:
public YourView()
{
...
if (DesignerProperties.GetIsInDesignMode(this))
{
//set up design time dependencies here...
}
}