Click here to Skip to main content
15,913,836 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Page Navigation Using "Silverlight Application" project type Pin
Pete O'Hanlon25-Feb-11 2:55
mvePete O'Hanlon25-Feb-11 2:55 
GeneralRe: Page Navigation Using "Silverlight Application" project type Pin
Sunasara Imdadhusen25-Feb-11 5:02
professionalSunasara Imdadhusen25-Feb-11 5:02 
GeneralRe: Page Navigation Using "Silverlight Application" project type Pin
Pete O'Hanlon1-Mar-11 6:29
mvePete O'Hanlon1-Mar-11 6:29 
QuestionQuestion about MEFedMVVM Pin
wasimsharp24-Feb-11 5:35
wasimsharp24-Feb-11 5:35 
AnswerRe: Question about MEFedMVVM Pin
Mycroft Holmes24-Feb-11 12:11
professionalMycroft Holmes24-Feb-11 12:11 
AnswerRe: Question about MEFedMVVM Pin
_Maxxx_24-Feb-11 13:19
professional_Maxxx_24-Feb-11 13:19 
GeneralRe: Question about MEFedMVVM Pin
Mycroft Holmes24-Feb-11 14:00
professionalMycroft Holmes24-Feb-11 14:00 
GeneralRe: Question about MEFedMVVM Pin
_Maxxx_24-Feb-11 15:10
professional_Maxxx_24-Feb-11 15:10 
Mycroft Holmes wrote:
the controller still needs to be aware of all the VMs


You're right - but I don't see not nuffin' wrong with that.

IN the example cited by the OP I would probably have a property of VM1, VM2 etc. in my parent Vm - and access either methods, messages or events on or from them.

The controller just allows for more consistent communication - your children VM ask the controller to do something (Hey controller, this data has changed, better handle that for me). The Controller then says to itself "Hey! this is a change in this data - I better let everyone know!" so it raises an event/sends a message/calls a method on a VM - whatever to let those interested parties know.


Mycroft Holmes wrote:
how about a message style where the main VM sends a message to save and the other VMs consume the message.


Not sure that works - if a child Vm receives the message, how does it give the modified data back to the parent VM?

I prefer the "I've changed something, please deal with it" paradigm, rather than the "Hey, have you changed anything? If so, give me the changes." paradigm.

(Although, now I am thinking about at least implementing a "Some data has been changed by this VM" property in my base VM class - which in turn can send a message... So now the Parent VM can subscribe to any Child VM messages, and the message (at least potentially) can carry the modified data.

Hmmm

Child Vm1 changes the patient BP - it is now 'dirty' and sends a message to say so.

Parent Vm0 has subscribed to the "BP Has Changed" message which carries with it a BP object.

VM0 saves the data to the repository and sends out a "BP Has been Saved" message - which is (of course) subscribed to by the Vm1, which resets itself to "Clean"

Sorry to think outloud in a reply - no sensible buggers at work to talk to!
___________________________________________
.\\axxx
(That's an 'M')

GeneralRe: Question about MEFedMVVM Pin
Mycroft Holmes24-Feb-11 15:55
professionalMycroft Holmes24-Feb-11 15:55 
GeneralRe: Question about MEFedMVVM Pin
_Maxxx_24-Feb-11 17:18
professional_Maxxx_24-Feb-11 17:18 
GeneralRe: Question about MEFedMVVM Pin
wasimsharp24-Feb-11 19:39
wasimsharp24-Feb-11 19:39 
AnswerRe: Question about MEFedMVVM Pin
Pete O'Hanlon24-Feb-11 22:19
mvePete O'Hanlon24-Feb-11 22:19 
GeneralRe: Question about MEFedMVVM Pin
Jammer24-Feb-11 23:14
Jammer24-Feb-11 23:14 
GeneralRe: Question about MEFedMVVM Pin
Pete O'Hanlon24-Feb-11 23:37
mvePete O'Hanlon24-Feb-11 23:37 
GeneralRe: Question about MEFedMVVM Pin
Jammer25-Feb-11 5:07
Jammer25-Feb-11 5:07 
GeneralRe: Question about MEFedMVVM Pin
Pete O'Hanlon25-Feb-11 8:20
mvePete O'Hanlon25-Feb-11 8:20 
GeneralRe: Question about MEFedMVVM Pin
Jammer25-Feb-11 8:27
Jammer25-Feb-11 8:27 
GeneralRe: Question about MEFedMVVM Pin
SledgeHammer0125-Feb-11 9:12
SledgeHammer0125-Feb-11 9:12 
GeneralRe: Question about MEFedMVVM Pin
Jammer5-Mar-11 6:25
Jammer5-Mar-11 6:25 
Questionrefresh after showing page Pin
arkiboys24-Feb-11 2:48
arkiboys24-Feb-11 2:48 
AnswerRe: refresh after showing page Pin
Mycroft Holmes24-Feb-11 12:08
professionalMycroft Holmes24-Feb-11 12:08 
GeneralRe: refresh after showing page Pin
arkiboys24-Feb-11 21:35
arkiboys24-Feb-11 21:35 
QuestionHow to disable the previous dates(date less than today) in a calendar Pin
Rocky2323-Feb-11 21:54
Rocky2323-Feb-11 21:54 
AnswerRe: How to disable the previous dates(date less than today) in a calendar Pin
Groulien23-Feb-11 22:09
Groulien23-Feb-11 22:09 
QuestionShow insert row until data is not valid [Telerik WPF RagGridView] [modified] Pin
johnsson7723-Feb-11 20:07
johnsson7723-Feb-11 20:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.