Very odd. Everything else works. My MainView gets called by App.xaml.cs, and is part of a composed batch. MainView imports MainViewModel, which in turn does an ImportMany on other models, such as DatabaseLoginModel. So in MainViewModel I have this:
[ImportMany("CentralModel")]
private Lazy<ViewModelBase, ICentralViewMetaData>[] views = null;
views, then, does indeed contain the models I want, which get displayed just fine.
But this property, in MainViewModel:
[Export("SetActiveView")]
public string SetActiveView
{
set { _av = value; }
get { return _av; }
}
Is still not being properly imported in DatabaseViewModel:
[Import("SetActiveView")]
public string SetActiveView { get; set; }
Is it possibly because of the Lazy ImportMany of DatabseViewModel?
What else could it be? As far as I can tell, all the right viewmodels are being created by MEF correctly, but I still cant inject a property.