public UnloadedWeakEventListener(FrameworkElement source, BehaviorCollectionEx collection) { this.collection = collection; WeakEventManager <FrameworkElement, EventArgs> .AddHandler(source, "Unloaded", OnEvent); }
public LoadedWeakEventListener(FrameworkElement source, BehaviorCollectionEx collection) { this.frameworkElement = new WeakReference <FrameworkElement>(source); this.collection = collection; WeakEventManager <FrameworkElement, EventArgs> .AddHandler(source, "Loaded", OnEvent); }
public static void SetBehaviors(DependencyObject obj, BehaviorCollectionEx value) { obj.SetValue(BehaviorsProperty, value); }