Dialogs and Regions

Topics: Prism v4 - WPF 4
Mar 31, 2011 at 12:33 PM

Hi,

I am trying on work out a solution for a scenario similar to the 'Option' dialog in MS word. I have multiple buttons on the right side of the window and a some view shown on my left side empty space.

Looks like as I need to change my view based on the buttons clicked, I need to have use concept for Regions used in a dialog. So when I click a button, a new view is going to be loaded, for another button, another view would be loaded.

Do you guys think this is a good approach? Any pointers are appreciated.

Thanks,

Indrasis

Mar 31, 2011 at 3:06 PM

Hi Indrasis,

Your approach seems to be a valid possibility to achieve your scenario. You could achieve your requirement by using a SingleActiveRegion to load the views (following the View Injection approach).

You can read Chapter 8: Navigation, specifically Prism Region Overview section where these topics are covered.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

 

Apr 1, 2011 at 1:29 PM

 

Hello Miguel,

Is there any simple application available to refer to?

Regards,
Indrasis

 

 

Apr 1, 2011 at 3:19 PM

Indrasis,

You could check Exercise 1 Hands-On-Lab solution, located in the Navigation folder of the Prism Training Kit.

Is not following the View Injection approach, instead uses View-Based Navigation where the navigation is accomplished via the addition or removal of elements (views) from the visual tree.

The exercise´s scenario seems to be very close with the one you are trying to fulfill.

Please let me know if this information helps you.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

 

Apr 6, 2011 at 9:09 AM

Hello Miguel,

This works perfectly.Thanks.

Regards,
Indrasis