I have views with constructors like this:
MyView(MyViewModel viewModel)
and viewmodels with constructors like this:
MyViewModel(RuntimeParameter runtimeParam, <design-time resolvable parameters>)
I would like to create a View Factory using Castle Windsor's Typed Factory Facility feature so that I can create Views by calling
MyView view = factory.Create(runtimeParam);
I've been able to make a ViewModel factory using the Castle Windsor documentation here, but I can't make the View Factory work. The run-time parameter passed to the View factory needs to be handed down to the ViewModel. Is there a way to tell Windsor to do that?
I suppose I could use two factories - one for the view and one for the viewmodel, but that seems ugly...