public SimulationResultItemViewModel(IAccount account, List <SimulationResultItem> items) { Name = account.Name; _items = new ObservableCollectionEx <SimulationResultItem>(); _items.Set(items); Items = CollectionViewSource.GetDefaultView(_items); GroupCommand = new DelegateCommand(DoGroup, CanGroup); UnGroupCommand = new DelegateCommand(UnGroup, CanUnGroup); }
public CollectionEditorViewModel(ProfileViewModel profile, IEnumerable <TModel> items) { Profile = profile; if (items != null) { _items.Set(items.Select(m => ToViewModel(m))); } SelectedItem = _items.FirstOrDefault(); _items.CollectionChanged += _items_CollectionChanged; }
public ScheduleResultViewModel(IEnumerable <SimulationResultItem> items) { Items = new ObservableCollectionEx <SimulationResultItem>(); Items.Set(items); }