开发者

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")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜