Problem with sending message with parameter in mvvm light toolkit
I've registered two messages:
Messenger.Default.Register<NotificationMessage<DriverEventItem>>(this, NotificationMessageReceived);
Messenger.Default.Register<NotificationMessage>(this,NotificationMessageReceived);
and I have two methods to handle this message:
private void NotificationMessageReceived(NotificationMessage<DriverEventItem> msg)
{
//so开发者_JAVA百科mething
}
private void NotificationMessageReceived(NotificationMessage msg)
{
//something
}
but this
var nm=new NotificationMessage(this.SelectedShowroomLog.DriverEventItem,"ShowView2");
Messenger.Default.Send(nm);
invokes me the second handler.
What should I do to correctly send this driveritem to a recipient?
It was simply :)
NotificationMessage(this.SelectedShowroomLog.DriverEventItem,"ShowView2")
精彩评论