private void RefreshData() { GetRunTimeData(); var selected = new ProjectsCollection(); foreach (var oldProject in SelectedProjects) { //Check if New Project List contains Selected Project //Check if New Activity List contains Selected Project Activity if (AllProjects.Contains(oldProject) && Activities.Contains(oldProject.Activity)) { //Get Project from the server(In case Name or other data were changed) var newProject = AllProjects[AllProjects.IndexOf(oldProject)]; //Add Project to selected List only if Project and Activity are still available selected.Add(newProject); } } SelectedProjects = selected; }