Suppose I have a ListBox which is bound to a collection of Foo objects, and the selected Foo is displayed in a contentcontrol with the content template being a FooView.
Is there a way that I can make it so that the FooView passes the selected Foo to the constructor of the FooViewModel which is it’s datacontext via the ViewModelLocator?
MainViewModel
MainView