private void MoveNote(int direction) { if (NotesListBox.Items.Count == 0 || NotesListBox.SelectedIndex == -1 || (NotesListBox.SelectedIndex == 0 && direction == -1) || (NotesListBox.SelectedIndex == NotesListBox.Items.Count - 1 && direction == 1)) { return; } NotesListBox.SelectedIndex += direction; NotesListBox.ScrollIntoView(NotesListBox.SelectedItem); }
private void ScrollListBox(int index) { NotesListBox.ScrollIntoView(NotesListBox.Items[index]); }
private void ScrollListBox() { NotesListBox.ScrollIntoView(NotesListBox.Items[NotesListBox.Items.Count - 1]); }