Hello I'm new to PRISM and MEF and I have been looking from other threads about how to do what I have done so far, with complete success I must say thanks to the help users provide here, but I'm stuck right now.
I will explain the situation.
I have a main xap (let's call it that way) that whenever a user clicks an option from a treeview it loads an external module from another xap (so far this is working).
In this other xap I load I have right now another region too in the shell view where I load a view from that same xap (this is working too), but if I click to add another instance of this xap using RequestNavigate, I get an exception about the region inside
this xap already exists.
I have read about scoped regions, but looks like I don't know how to implement them.
In this loaded xap I have two modules declared, one that acts like the external module to let the main xap load it, and an 'inner' one that prepares the regions inside the xap.
As I understand (maybe I'm wrong) if I set the external module to create the scoped region of all the application, every region inside it would have to act independently from the main region right?
ListView view = new ListView();
IRegionManager rm = regionManager.Regions("MainRegion").Add(view, null, true);
I have those two lines in the Initialize method of the 'external' module, but looks like it's not working at all, as when I try to instantiate a second view it produces the exception saying that the inner region name already exists.
What I'm doing wrong?