using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using BookApp.Data; using System.Windows.Input; using BookApp.Model; using System.Collections.ObjectModel; namespace BookApp.ViewModel { public class SearchViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public ObservableCollection BookCollection { get; set; } = new ObservableCollection(); protected virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } /* public ICommand PerformSearch => new Command((string query) => { //SearchResults = DataService.GetSearchResults(query); SearchResults = BookCollection = BookCollection.Select(query); }); private List searchResults = BookCollection.GetStubData(); public List SearchResults { get { return searchResults; } set { searchResults = value; NotifyPropertyChanged(); } }*/ } }