public void SetCandidates(List <Candidate> candidates) { //Set chosen candidates _candidates = candidates; CandidateList.ClearCandidates(); CandidateList.AddCandidates(candidates); //If no candidates chosen, display info NoCandidatesTextBlock.Visibility = candidates.Count == 0 ? Visibility.Visible : Visibility.Collapsed; }
public void ClearCandidates() { //Clear chosen candidates _candidates = null; CandidateList.ClearCandidates(); }