Hi Stephen,

 

Ok, the problem with Prism is that there is an awful lot of code to sift
through to try to get a hint of what the problem is.

 

I think you are correct - the region can only contain a single view at a
time. My understanding is that I need to somehow activate the view that I
want. I'm not doing this, I am simply loading up both views and that I
believe is the problem. 

 

So I'm currently trying to have a look at how the activation is done with
the Stocktrader RI. I won't get a chance to have a look at my original code
until tomorrow.

 

Regards,

Tony

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Stephen Price
Sent: Wednesday, 24 March 2010 7:53 PM
To: ozSilverlight
Subject: Re: Prism, how to switch Regions

 

Being a content control, I'm thinking the region can only contain a single
view at a time. On your click event handler how are you telling it to show
your new view? 

Are you using unity to resolve your view or are you creating a new instance
of the view manually? 

 

Can you post a snippet of the problem code?

 

cheers,

Stephen

On Wed, Mar 24, 2010 at 12:10 PM, <[email protected]> wrote:

Hi all,

I have created a basic Prism application with buttons as menu items. I have
an About button and a
Home button. I have a MenuClickedEvent. Within my Shell, I have created a
Region
called "MainContentRegion" within a ContentControl.

Ok, so now I've created a HomeModule (a basic home page) and an AboutModule
(a basic about
page). I have registered them. When my application starts up, it shows the
Home page from the
HomeModule within my MainContentRegion.

When I click on the Menu button for About, it fires a MenuChangedEvent with
the name of the
button clicked. Both HomeModel and AboutModel subscribe to the
MenuClickedEvent and have
handlers. Within the handlers, I attempt to change the content of the page.
So when I click on
About, I expect the content to change with the MainContentRegion.

Content of particular elements do change on the page, but the clicking on
the About button does
not switch the MainContentRegion from the Home page to the About page. What
am I doing wrong?

Regards,
Tony

_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

 

_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to