Hello gan_s,
I did as you recommended, and the result was:
ex = {System.ComponentModel.Composition.ImportCardinalityMismatchException: No valid exports were found that match the constraint '((exportDefinition.ContractName == "MainApp.Shell") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso"M...
I tried with only one child import and the result was the same.
I do not understand why this approach should work. If the module is not loaded at the application start through the bootstrapper, how does the shell know what to import?
Second, if the module is loaded, the class is essentially empty except for the initialization method. How does loading the module, which does not seem to have any knowledge of the two child classes, pass the exported child window classes when it is loaded in the Shell.
There appears to be some 'Black Magic' going on that I do not understand. It may be very simple as you said, but I still do not get it.
Thanks, Warren