Richer ScrollIntoView
ListView has two overloads of ScrollIntoView: the one-parameter version that matches ListBox’s version, and one that accepts an extra ScrollIntoViewAlignment enumeration parameter. This provides two options:
→ Default—The control scrolls the minimal distance necessary to put the item entirely on the screen. Therefore, if the item is already on the screen, the control won’t scroll at all. This provides the same behavior as the simpler overload and the same behavior as ListBox.
→ Leading—The control scrolls as much as necessary to make the item the first one visible (or as close as possible if there aren’t enough items following it). That means the top edge when scrolling vertically, or the left edge when scrolling horizontally ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access