Good Day Everyone. I'm creating a Xamarin.Forms Portable Application I just want to ask how am I going to convert this expression from List to ObservableCollection. Take a look at the 'ToList();' code. I don't know how to change it in order for it to read an observable collection.
CustomerList = _searchedCustomerList.Where(r => r.CUSTOMER_NAME.ToLower().Contains(_keyword.ToLower())).ToList();
I'm having problem how to do this because I prefer to use an ObservableCollection rather than the List. So I declare the CustomerList as ObservableCollection.
public ObservableCollection<Customer> CustomerList
{
get
{
return _customerList;
}
set
{
_customerList = value;
OnPropertyChanged();
}
}
Is there anyway to do this? Thanks a lot.