Based on my understanding of your scenario this error could be happening due to a timing issue, as the
DelayedRegionCreationBehavior will create a new region when the control that will host the region is added to the
VisualTree. Hence, when using ViewModel first approach like in your case, your new region won't be available when you try adding the inner views in your
ViewModel's constructor as the corresponding view has not yet been added to the
As far as I know, to avoid this kind of errors you could try using the
View Discovery approach to register your views from inside your
ViewModel's constructor. This way when a region is created, the region looks for all the
ViewTypes associated with the region and automatically instantiates and loads the corresponding views.
You could find more information about this in the following chapter of the
Prism documentation at MSDN:
As another option, you could add the inner views once you ensure the region has been added to the
VisualTree. For example in your view model you could subscribe to the
Loaded event of the view and add the corresponding inner views in its handler method.
I hope you find this handy,