private void items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { switch (e.Action) { case System.Collections.Specialized.NotifyCollectionChangedAction.Add: foreach (var x in e.NewItems) { if (x is ContentAreaViewModel ca) { ContentAreas.Add(ca); } } break; case System.Collections.Specialized.NotifyCollectionChangedAction.Move: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Remove: foreach (var x in e.OldItems) { if (x is ContentAreaViewModel ca) { ContentAreas.Remove(ca); } } break; case System.Collections.Specialized.NotifyCollectionChangedAction.Replace: break; case System.Collections.Specialized.NotifyCollectionChangedAction.Reset: break; default: break; } }
public PluginContentFile LoadContentFile(string path, ContentAreas area) { return(PluginContentFile.Load(path, this, area)); }