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 ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.