Beispiel #1
0
 private void On_BTN_Insert_Click(object sender, RoutedEventArgs e)
 {
     if (LB_Gaos.SelectedIndex != -1)
     {
         int   idx = LB_Gaos.SelectedIndex + 1;
         GaoVM vm  = new GaoVM();
         vm.Name = TXT_Name.Text;
         vm.Text = TXT_Text.Text;
         GaoData.Data.Insert(idx, vm);
         _colle.Insert(idx, vm);
         TXT_Text.Clear();
         LB_Gaos.ScrollIntoView(vm);
     }
 }