wpf - How to focus on the current ListView item that just add -


i have wpf application , listview. when add files listview can see first 10 items , when adding files can see vertical scroll bar , want when add files focus on last item added. try select last item:

listview.selectedindex = lvpcapfiles.items.count - 1; 

or

listview.selecteditem = lvpcapfiles.items.count - 1; 

but first option select last item focus still no there.

the second nothing.

you can use

 listview.selectedindex = lvpcapfiles.items.count - 1;  listview.scrollintoview(listview.selecteditem); 

there articles you. here


Comments

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World