Click here to Skip to main content
15,897,187 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: MVVM Question Pin
Pete O'Hanlon14-Feb-11 0:42
mvePete O'Hanlon14-Feb-11 0:42 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 13:51
professional_Maxxx_14-Feb-11 13:51 
AnswerRe: MVVM Question Pin
lmoelleb14-Feb-11 1:47
lmoelleb14-Feb-11 1:47 
GeneralRe: MVVM Question Pin
Pete O'Hanlon14-Feb-11 5:13
mvePete O'Hanlon14-Feb-11 5:13 
GeneralRe: MVVM Question Pin
Mycroft Holmes14-Feb-11 13:36
professionalMycroft Holmes14-Feb-11 13:36 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 13:58
professional_Maxxx_14-Feb-11 13:58 
GeneralRe: MVVM Question Pin
Mycroft Holmes14-Feb-11 14:06
professionalMycroft Holmes14-Feb-11 14:06 
AnswerRe: MVVM Question Pin
SledgeHammer0114-Feb-11 15:03
SledgeHammer0114-Feb-11 15:03 
A few things I didn't see mentioned in responses:

1) In *proper* 100% by the book mvvm, ViewModels shouldn't known about each other. With that being said, how could they subscribe to events? Smile | :)

2) You could put all your message types in a central place for convenience. Or make static public members. Same thing. There are pros and cons to both.

3) I've never seen a messenger class with weak references. What framework was that in? Usually they do something like Messenger.GetMessage(messageType).Subscribe(callback) or Messenger.GetMessage(messageType).Handler += callback.

The one I wrote doesn't use weak references, but it handles "bad" handlers by removing the subscription. I think thats a bigger concern then mem leaks. Also, async is a big deal. No point in calling one callback and waiting for it to finish (most messenger classes I've seen do this!) before calling the next.
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 17:03
professional_Maxxx_14-Feb-11 17:03 
GeneralRe: MVVM Question Pin
SledgeHammer0114-Feb-11 19:27
SledgeHammer0114-Feb-11 19:27 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 23:19
professional_Maxxx_14-Feb-11 23:19 
GeneralRe: MVVM Question Pin
Pete O'Hanlon14-Feb-11 22:19
mvePete O'Hanlon14-Feb-11 22:19 
AnswerRe: MVVM Question Pin
Abhinav S14-Feb-11 18:21
Abhinav S14-Feb-11 18:21 
GeneralRe: MVVM Question Pin
_Maxxx_14-Feb-11 18:55
professional_Maxxx_14-Feb-11 18:55 
GeneralRe: MVVM Question [modified] Pin
SledgeHammer0115-Feb-11 7:31
SledgeHammer0115-Feb-11 7:31 
AnswerRe: MVVM Question Pin
BubingaMan22-Feb-11 0:05
BubingaMan22-Feb-11 0:05 
GeneralRe: MVVM Question Pin
_Maxxx_22-Feb-11 13:41
professional_Maxxx_22-Feb-11 13:41 
GeneralRe: MVVM Question Pin
BubingaMan22-Feb-11 22:04
BubingaMan22-Feb-11 22:04 
GeneralRe: MVVM Question Pin
_Maxxx_23-Feb-11 12:47
professional_Maxxx_23-Feb-11 12:47 
QuestionHow to return the value in Silverlight? [modified] Pin
Tesic Goran13-Feb-11 22:52
professionalTesic Goran13-Feb-11 22:52 
AnswerRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:32
mvePete O'Hanlon14-Feb-11 0:32 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 0:56
professionalTesic Goran14-Feb-11 0:56 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:58
mvePete O'Hanlon14-Feb-11 0:58 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 2:04
professionalTesic Goran14-Feb-11 2:04 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes14-Feb-11 13:32
professionalMycroft Holmes14-Feb-11 13:32 

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.