Ejemplo n.º 1
0
        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);
        }