Make ListView.ScrollIntoView Scroll the Item into the Center of the ListView (C#)

Posted by Kirk on Stack Overflow See other posts from Stack Overflow or by Kirk
Published on 2010-06-01T02:18:49Z Indexed on 2010/06/01 2:23 UTC
Read the original article Hit count: 1591

Filed under:
|
|
|

ListView.ScrollIntoView(object) currently finds an object in the ListView and scrolls to it. If you are positioned beneath the object you are scrolling to, it scrolls the object to the top row. If you are positioned above, it scrolls it into view at the bottom row.

I'd like to have the item be scrolled right into the center of my list view if it is currently not visible. Is there an easy way to accomplish this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf