good you mentioned about the statiс field, I was wondering why is always null :)
well, as you can see lower I have such a code
UICore = _container.GetExportedValue<IUICore>();
so this field is set correctly and the MainWindow gets created find by the line above.
And I'm using WinForms, not WPF .
Well anyway, I figured out, that if I share _container field acrros the application and in my constructor I call
then all the Import fields are automatically filled with correct values.
However here appears another problems, cause all the other libraries (plugin) that are supposed to be separate from main project do not have access to that field so my problem is not solved entirely.
What the best approach to work with MEF?
P.S. I checked the samples.