public void FiltherProjects() { if (!string.IsNullOrWhiteSpace(SearchProject)) //If something is entered then filter { ShownProjectsCollection = new BindableCollection <Project>(AllProjects.Where(p => string.IsNullOrWhiteSpace(p.ProjectID) ? false : p.ProjectID.Contains(SearchProject)).ToList()); } else //Else show all elements { ShownProjectsCollection = new BindableCollection <Project>(AllProjects.ToList()); } NotifyOfPropertyChange(() => ShownProjectsCollection); }