/// <summary> /// This method is called each time our source binding changes /// </summary> /// <param name="e"></param> private void EvaluateBindingChange(DependencyPropertyChangedEventArgs e) { DataBindingHelper.EnsureDataBindingOnActionsUpToDate(this.Actions); bool hasValue = (base.ReadLocalValue(ValueProperty) != DependencyProperty.UnsetValue); if (!hasValue || ComparisonLogic.Evaluate(Binding, ComparisonCondition, Value)) { // Pass the result of the binding Interaction.ExecuteActions(AssociatedObject, Actions, Binding); } }
/// <summary> /// Method which performs the comparison /// </summary> /// <returns>True/False for equality</returns> private bool Compare() { return((base.AssociatedObject != null) && ComparisonLogic.Evaluate(base.Binding, this.Comparison, this.Value)); }