Not able to load View in region in my view

Topics: Prism v4 - Silverlight 4
Jul 20, 2012 at 11:22 AM

Hi to all friends out there .

I am new in prism development .I have created my shell(main page) and in it i have created region there. I have many view withing module which i need to load on region on executing certain commands.


I am tring to load with Region Manager instance.This is how i am doing.

This code i am writing in my viewmodel 

 public void Initialize()
            _regionmanager.RegisterViewWithRegion("FamilytreeDetails", typeof(View.FamilyTreeProfilleDetail));

So please tell me how to do it and explain why it is not working in my case.


Jul 20, 2012 at 2:14 PM
Edited Jul 20, 2012 at 2:16 PM


So far I couldn't find anything wrong within the code snippets you provided.

As a starting point, I believe you could check the Silverlight Hands-On Lab: Get Started with the Prism Library which explains step by step how to create a solution using Prism, there a view is added to a region in the Shell using the View Discovery Approach to register the view similarly like you posted above.

Also, you could find more information regarding the use of the View discovery approach and the different approaches you could use to compose your UI in the following chapter of the Prism documentation:

Regarding the use of Commands in your View Models, you could find useful information in the following section of the documentation:

Additionally, I recommend you to check the Prism Training Kit which contains a set of Hands-On-Labs that are meant to help you get familiar with Prism in an easy, interactive way.

I hope you find this handy,

Agustin Adami