Tuesday, September 29, 2009

WPF #4 - Scroll to a ListViewItem programatically

Hi guys, now you have to be tired of WPF tips. Aren't you?

Well, after playing around a little bit with ListView I've bumped into a problem, how to select an item programatically?

Couldn't be easier:

this.listView.ScrollIntoView(this.listView.Items[index]);

Pretty neat right?

See ya next time!