Nested imported VMs

Jan 13, 2012 at 3:23 PM
Edited Jan 13, 2012 at 3:28 PM

I have a few nested ViewModels. I export them by [ExportViewModel("Name", true)] attribute and want to import them by [ImportingConstructor].

What is the right way to do it?

As I understand [ExportViewModel("ABC")] is not equal [Export(typeof(ABC))] so

class ABC

[ImportingConstructro] public XYZ(ABC abc)

Will not work.

And the solution is:

class ABC


Hopefully, [ExportService] works great in this way.

But is there any way to import exported by [ExportViewModel] attribute class into [ImportingContructor]?