且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Prism CompositePresentationEvent 触发两次

更新时间:2023-02-05 20:05:20

我觉得是代码的问题

this.eventAggregator.GetEvent<ReportAddedEvent>().Subscribe(this.OnReportAdded);

订阅 ReportAddedEvent 执行两次.

to subscribe to the ReportAddedEvent is executed two times.

您应该检查(通过使用调试器和线路上的断点)它是否执行了多次.

You should check (by using a debugger and a breakpoint on the line) if it executes more than once.