private void MaterialsList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.Source == MaterialsList) { MaterialButton_Click(this, e); MaterialsList.UnselectAll(); } else if (e.Source == TasksList) { TaskButton_Click(this, e); TasksList.UnselectAll(); } }