private void Btn_left_Click(object sender, RoutedEventArgs e) { if (cImgIndex > 0) { cImgIndex--; } else { cImgIndex = 0; } List_imgs.SelectedIndex = cImgIndex; List_imgs.ScrollIntoView(List_imgs.SelectedItem); }
private void Btn_right_Click(object sender, RoutedEventArgs e) { if (cImgIndex < totalImgNum - 1) { cImgIndex++; } else { cImgIndex = totalImgNum - 1; } List_imgs.SelectedIndex = cImgIndex; List_imgs.ScrollIntoView(List_imgs.SelectedItem); }