I watch Mike Tutley's amazing entry into Prism. It all made sense, but I was a little embarrassed in the sixth video.
It has a constructor for the view class that takes a ViewModel parameter. He then says that unity will fill it for us (i.e., Build it).
In the past, he had to register such things (i.e. IMyClass registered in MyClass). But he did not do this for the ViewModel.
The only difference I see is that the dependency on the ViewModel was not an interface, but rather a direct one. Unity sees this and is just trying to build a ViewModel or am I missing a step? (And if the ViewModel had parameters, would he try to make them too?)
source share