private void OnLoad(object sender, RoutedEventArgs e) { listView_Question.ItemsSource = null; listView_Question.Items.Clear(); listView_Reponse.ItemsSource = null; listView_Reponse.Items.Clear(); LRS.Clear(); QS = new question__sequence(); }
public void button_ValiderQuestion_Click(object sender, RoutedEventArgs e) { PPE.question__sequence QS = new question__sequence() { Intitule = textBox_ModifQuestion.Text }; (App.Current as App).newsequence.question__sequence.Add(QS); listView_Question.Items.Add(QS); listView_Question.Items.Refresh(); }
private void button_Valider_Click(object sender, RoutedEventArgs e) { question__sequence laquestion = listView_Question.Items.GetItemAt(0) as question__sequence; foreach (var item in listView_Reponse.Items) { laquestion.reponse__sequence.Add(item as reponse__sequence); } (App.Current as App).newsequence.question__sequence.Add(laquestion); }