Answer the question
In order to leave comments, you need to log in
c# wpf listview how to prevent arrow from jumping?
There is a wpf listview
if you press the arrows on the keyboard, then by default the select item will change
how to make it so that when the last element is selected - in the far one it does NOT jump to the first one but remains there?
Answer the question
In order to leave comments, you need to log in
private void listView_PreviewKeyDown(object sender, KeyEventArgs e)
{
switch(e.Key)
{
case Key.Down:
//здесь логика сравнения - сейчас последний элемент или нет,
//если последний то e.Handled = true
break;
default:
break;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question