private void ShowFilteredList() { var schemas = this.ApplicationContext.GetProperty(AppConstants.AllSchemasContextPropertyName) as ObservableCollection <SchemaSelectionItemViewModel>; if (schemas != null && schemas.Count != 0) { if (SchemaFilter != "" && schemaFilter != null) { this.FilterItems = new ObservableCollection <SchemaSelectionItemViewModel>(schemas.Where(x => x.MigrationEntity.schemaFullName.ToLower().Contains(SchemaFilter.ToLower()) || x.MigrationEntity.assemblyFullyQualifiedName.ToLower().Contains(SchemaFilter.ToLower()))); this.FilterDataGridEnabled = true; this.SchemaDataGridEnabled = false; this.SearchBoxEnabled = FilterDataGridEnabled | SchemaDataGridEnabled; } else { this.FilterDataGridEnabled = false; this.SchemaDataGridEnabled = true; this.SearchBoxEnabled = FilterDataGridEnabled | SchemaDataGridEnabled; } } else { this.FilterDataGridEnabled = false; this.SchemaDataGridEnabled = false; this.SearchBoxEnabled = FilterDataGridEnabled | SchemaDataGridEnabled; } }