private void group_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (semester.Text != "") { disc.SelectedItem = null; ListInterface a = new ClassList(); disc.ItemsSource = a.GetDisciplineSpec(semester.Text, group.SelectedItem.ToString()); } a3.Visibility = Visibility.Hidden; if (semester.Text != "" && type.Text != "" && disc.Text != "" && teacher.Text != "") { p.Visibility = Visibility.Hidden; } }