public void Clear() { foreach (var cb in checkboxes) { cb.IsChecked = false; } } public void updateList(List<String> names)