public GroupLayer(GroupLayerPresenter model) : base(model) { _adapter = new ObservableCollectionAdapter<LayerPresenter, CanvasLayer>(layer => { return LayerFactory.Default.Create(layer); }); _adapter.Dependent.CollectionChanged += DependentCollectionChanged; if (model != null) _adapter.Primary = model.Layers; _dependent = new ReadOnlyObservableCollection<CanvasLayer>(_adapter.Dependent); }
public GroupLayer(GroupLayerPresenter model) : base(model) { _adapter = new ObservableCollectionAdapter <LayerPresenter, CanvasLayer>(layer => { return(LayerFactory.Default.Create(layer)); }); _adapter.Dependent.CollectionChanged += DependentCollectionChanged; if (model != null) { _adapter.Primary = model.Layers; } _dependent = new ReadOnlyObservableCollection <CanvasLayer>(_adapter.Dependent); }