wpfroutedevent

Are routed events weak in WPF


Does routed events in WPF store strong reference to the handler that is attached to them?


Solution

  • If the control author implemented the WeakEvent pattern then yes. I believe the stock controls use this pattern.

    UPDATE: They in fact do NOT. Here is a reference on this and other potential performance problems:

    Optimizing WPF Application Performance

    Here is a reference on weak events:

    Weak Event Patterns

    HTH

    Colby Africa