Implementing a message/subscription mechanism in C#

后端 未结 2 1438
傲寒
傲寒 2021-02-06 08:34

I\'m prototyping a WPF application with the MVVM pattern. Following an answer to this question I have set up a ModelProviderService which exposes models as properti

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-06 09:15

    If you want to distribute messages inside a WPF application, you may go with EventAggregator of prism framework.

    EventAggregator allows viewmodels to weakly subsribe to events, requiring no knowledge about the sender. This allows you to easily distribute messages accross components or modules.

提交回复
热议问题