Messaging issue with complex types

Nov 22, 2010 at 3:49 PM

Hi All,

I am facing with series of issues while using MVVMLight. One of them is passing non-string messages across the application. This is the message type I am passing -

 public class NameValue 
        public NameValue() 
        public string Name { get; set; } 
        public string Value { get; set; } 
in the View1
 Messenger.Default.Send<NameValue>(nv, "Message1"); 

in the ViewModel2

Messenger.Default.Register<NameValue>(this, "Message1", OnMessageSent); 
 private void OnMessageSent(NameValue nv) 

When I pass a message using Messender.Default from a View to another ViewModel it works when the message type is string but not when message type is 'NameValue' (a complex type).

Please let me know if there is some thing wrong in the implementation.

Thanks in advance !

Nov 22, 2010 at 4:05 PM

I was able to resolve this issue by debugging the source code uploaded on Friday.

The issue was in teh code where the message was being registered for listening different 'type' of messages with same name.