How to raise weak events?

82 views Asked by At

I'm reading the MS docs on how to implement the weak event pattern. I've tried the first two (since I'm looking for the simplest way) but I can't find a way to raise the event.

The existing weak event managers like the PropertyChangedEventManager, and the generic WeakEventManager only have methods to add and remove handlers but nothing to raise the event. Also, I can't inherit those it says [the base class] does not contain a constructor that takes 0 arguments (the constructors are private).

So I'm finding the docs confusing - how are these constituted the ways to implement the weak event pattern if there's no way to raise the event?

If the suggested way in the docs doesn't work I'm looking for the simplest way to raise and handle weak events.

0

There are 0 answers