Esempio n. 1
0
 private void mnuNewNote_Click(object sender, RoutedEventArgs e)
 {
     NoteItem creatednote = new NoteItem("New Note", "");
     _Notes.Add(creatednote);
     lstNotes.SelectedItems.Clear();
     lstNotes.SelectedItems.Add(creatednote);
 }
Esempio n. 2
0
 private void mnuNotesNew_Click(object sender, RoutedEventArgs e)
 {
     //add an item.
     //lstNotes.SelectedIndex = lstNotes.ItemsSource .Add(new NoteItem("New Note",""));
     var creatednote = new NoteItem("New Note");
     _Notes.Add(creatednote);
    // lstNotes.SelectedItem = creatednote;
 }
Esempio n. 3
0
 private void mnuNotesNew_Click(object sender, RoutedEventArgs e)
 {
     if (_Notes == null)
     {
         _Notes = new ObservableCollection<NoteItem>();
         lstNotes.ItemsSource = _Notes;
     }
     //add an item.
     //lstNotes.SelectedIndex = lstNotes.ItemsSource .Add(new NoteItem("New Note",""));
     var creatednote = new NoteItem("New Note");
     _Notes.Add(creatednote);
    // lstNotes.SelectedItem = creatednote;
 }