我已经注册了两条消息:
Messenger.Default.Register<NotificationMessage<DriverEventItem>>(this, NotificationMessageReceived);
Messenger.Default.Register<NotificationMessage>(this,NotificationMessageReceived);
我有两种处理此消息的方法:
private void NotificationMessageReceived(NotificationMessage<DriverEventItem> msg)
{
//something
}
private void NotificationMessageReceived(NotificationMessage msg)
{
//something
}
但是这个
var nm=new NotificationMessage(this.SelectedShowroomLog.DriverEventItem,"ShowView2");
Messenger.Default.Send(nm);
调用第二个处理程序。
如何正确地将此驱动项目发送给收件人?
答案 0 :(得分:0)
这很简单:)
NotificationMessage(this.SelectedShowroomLog.DriverEventItem “ShowView2”)