private void OnValidationResultRemoved(object sender, ValidationResultsChangedEvent e) { int index = this.validationResults.IndexOf(e.ValidationResult); System.Diagnostics.Debug.Assert(index >= 0); if (index >= 0) { this.validationResults.RemoveAt(index); this.RaiseCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, e.ValidationResult, index)); this.RaisePropertyChangedEvent("Count"); } }
private void OnValidationResultAdded(object sender, ValidationResultsChangedEvent e) { this.validationResults.Add(e.ValidationResult); this.RaiseCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, e.ValidationResult)); this.RaisePropertyChangedEvent("Count"); }