void MoveDown() { int itemIndex = AllBooks.IndexOf(SelectedBook); AllBooks.Move(itemIndex + 1, itemIndex); SelectedBook.BookID++; AllBooks[itemIndex].BookID--; }
void MoveUp() { int itemIndex = AllBooks.IndexOf(SelectedBook); AllBooks.Move(itemIndex - 1, itemIndex); SelectedBook.BookID--; AllBooks[itemIndex].BookID++; }
public bool MoveDownCanExecute() { if (SelectedBook == null) { return(false); } if (AllBooks.IndexOf(SelectedBook) == AllBooks.Count - 1) { return(false); } return(true); }
public bool MoveUpCanExecute() { if (SelectedBook == null) { return(false); } if (AllBooks.IndexOf(SelectedBook) == 0) { return(false); } return(true); }