You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PocketBook/src/BookApp/ViewModel/SearchViewModel.cs

47 lines
1.3 KiB

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<Book> BookCollection { get; set; } =
new ObservableCollection<Book>();
protected virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
/*
public ICommand PerformSearch => new Command<string>((string query) =>
{
//SearchResults = DataService.GetSearchResults(query);
SearchResults = BookCollection = BookCollection.Select(query);
});
private List<string> searchResults = BookCollection.GetStubData();
public List<string> SearchResults
{
get
{
return searchResults;
}
set
{
searchResults = value;
NotifyPropertyChanged();
}
}*/
}
}