private void SetOriginal(MergeTarget changedMergeTarget) { if (changedMergeTarget.IsOriginal) { MergeTargets.Where(t => t != changedMergeTarget && t.IsOriginal).ToList().ForEach(t => t.IsOriginal = false); } }
private void MergeItem_PropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case nameof(MergeTargets): MergeTargets.CollectionChanged += MergeTargets_CollectionChanged; MergeTargets.ToList().ForEach(t => { t.PropertyChanged += MergeTarget_PropertyChanged; }); break; } }