I've been trying to track down what was keeping one of my controls in memory after navigating away from the page and I believe I 'have isolated it to this:
DynamicLayer inherits from InformationLayer which uses your Telerik.Windows.Controls.FrameworkElementExtensions's RegisterForNotifications method.
This method creates a 'pinned'/effectively static attached dependancy property, and then registers a class level (not static) propertychanged event handler (InformationLayer's VisibilityPropertyChanged)
Becuase of this event handler, the DynamicLayer (and hence that Map its associated with and all upstream controls in its tree) are never garbage collected.
I cannot seem to find away to remove it through in inheritence or otherwise since everything is private and that dependency properties name is random..
We are using 2010.2.812.1040
DynamicLayer inherits from InformationLayer which uses your Telerik.Windows.Controls.FrameworkElementExtensions's RegisterForNotifications method.
This method creates a 'pinned'/effectively static attached dependancy property, and then registers a class level (not static) propertychanged event handler (InformationLayer's VisibilityPropertyChanged)
Becuase of this event handler, the DynamicLayer (and hence that Map its associated with and all upstream controls in its tree) are never garbage collected.
I cannot seem to find away to remove it through in inheritence or otherwise since everything is private and that dependency properties name is random..
We are using 2010.2.812.1040