private void SingleElementChangedListener(object sender, EventColllectionChangedArgs<IObject> e) { if (e.What == NotifyCollectionChangedAction.Add) e.Who.Value = 110; if (e.What== NotifyCollectionChangedAction.Remove) e.Who.Value = -110; }
private void OnBeforeTrackModifiedCommitted(object sender, EventColllectionChangedArgs<IModifiableTrack> e) { Track tr = (e.Who as TrackModifier).Track; switch (e.What) { case NotifyCollectionChangedAction.Add: tr.SetAlbum(this); if (this.IsStatusInitialized) { tr.ObjectStateChanges += StateChanged; } break; case NotifyCollectionChangedAction.Remove: if (this.IsStatusInitialized) { tr.ObjectStateChanges -= StateChanged; } break; } }