예제 #1
0
        void delegater_Bound(object sender, BindingEventArgs e)
        {
            Type itemType = e.Behavior.GetType();

            if (itemType.IsSubclassOf(TypeToCatch) || itemType.Equals(TypeToCatch))
            {
                Add((T)e.Behavior);
            }
        }
예제 #2
0
 void delegater_Unbound(object sender, BindingEventArgs e)
 {
     if (e.Behavior is T)
     {
         if (items.Contains((T)e.Behavior))
         {
             Remove((T)e.Behavior);
         }
     }
 }