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