We are wiring up our views and view models "externally" meaning we have the following type of code somewhere:
var viewModel = new MyViewModel();
var view = Application.Current.FindResource("MyView") as UserControl;
view.DataContext = viewModel;
That is a paraphrase of sorts. We do this so that the dll containing all of the views can be switched out at run-time. So long as the dll defines a resource named "MyView" that points to the usercontrol MyView all is good.
My concern is just to make sure that FindResource does not suffer or is inferior in a meaningful way to just doing the following:
var view = new MyView();
This could be replaced with IoC. (We don't allow the user to switch which view DLL is used. It is determined when the app starts.)
One thing with FindResource I have found is that you may have to use x:Shared="False"
or else WPF will hand you back an existing instance and you must make sure it is "initalized" back to its original state.
Any thoughts?