public MainViewModel(IEnumerable<IFeature> features)
 {
     this.features = new ObservableCollection<IFeature>(features);
     this.featuresView = CollectionViewSource.GetDefaultView(this.features);
     this.featuresView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(IFeature.GroupName)));
     this.featuresView.SortDescriptions.Add(new SortDescription(nameof(IFeature.Order), ListSortDirection.Ascending));
     this.addOrRemoveFeaturesCommand = new AsyncDelegateCommand(this.AddOrRemoveFeatures);
 } 
 public MainViewModel(IEnumerable<IFeature> features)
 {
     this.features = new FeatureCollection(features);
     this.featuresView = CollectionViewSource.GetDefaultView(this.features);
     this.featuresView.Filter = x => ((IFeature)x).IsVisible;
     this.featuresView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(IFeature.Group) + "." + nameof(IFeatureGroup.Name)));
     this.featuresView.SortDescriptions.Add(new SortDescription(nameof(IFeature.Group) + "." + nameof(IFeatureGroup.Order), ListSortDirection.Ascending));
     this.featuresView.SortDescriptions.Add(new SortDescription(nameof(IFeature.Order), ListSortDirection.Ascending));
     this.addOrRemoveFeaturesCommand = new AsyncDelegateCommand(this.AddOrRemoveFeatures);
 } 
 public ListBoxViewModel()
 {
     this.funds = new FundCollection();
     this.pinCommand = new AsyncDelegateCommand(this.Pin);
 }
 public DragAndDropViewModel()
 {
     this.funds = new FundCollection();
     this.showMessageBoxCommand = new AsyncDelegateCommand<string>(this.ShowMessageBox);
 }
Esempio n. 5
0
 public CommandsViewModel()
 {
     this.showMessageBoxCommand = new AsyncDelegateCommand<string>(this.ShowMessageBox);
 }