예제 #1
0
 public override void Perform()
 {
     if (IsRemoveAll)
     {
         BindingOperations.ClearAllBindings(FrameworkElement);
     }
     else
     {
         List <DependencyProperty> propertyList = PropertyForBinding.GetPropertiesForBinding(FrameworkElement);
         if (propertyList != null && propertyList.Count > 0)
         {
             RemoveIndex %= propertyList.Count;
             BindingOperations.ClearBinding(FrameworkElement, propertyList[RemoveIndex]);
         }
     }
 }
예제 #2
0
 public override bool CanPerform()
 {
     dpList = PropertyForBinding.GetPropertiesForBinding(FrameworkElement);
     return(dpList != null && dpList.Count > 0);
 }