Esempio n. 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]);
         }
     }
 }
Esempio n. 2
0
 public override bool CanPerform()
 {
     dpList = PropertyForBinding.GetPropertiesForBinding(FrameworkElement);
     return(dpList != null && dpList.Count > 0);
 }