views:

37

answers:

1

I am looking at creating my own development framework for Silverlight as an exercise in understanding MVVM and approaching some concepts that are still unknown to me. So there are a couple of issues:

1)

I am thinking about the following problem: I create custom/user controls that contain buttons/hyperlinks that would essentially change the current view.

How would something like that be bound following the MVVM paradigm. How would the view-model capture that information, such that the destination Uri is not hardcoded in the control or the view?

2)

It seems that the view-model should be responsible with announcing a higher level entity -- caliburn and prism call it Shell -- that a new view needs to be loaded and which one.

How would this mechanism work?

A: 

You may want to look at the navigation framework in SL4 it may make you rethink how to accomplish many things.

but 1) You define a Frame to somewhere in your application and bind its source to your usercontrols, which inherit their datacontex from their new parent.

Dimestore Cowboy