Navigating
In this context, navigating a view refers to managing the current item—not the kind of navigation discussed in Part III, “Working with the App Model.” ICollectionView not only has a CurrentItem property (and a corresponding CurrentPosition property that exposes the current item’s zero-based index), but it also has a handful of methods for programmatically changing the current item: MoveCurrentToNext, MoveCurrentToPrevious, MoveCurrentToPosition, and so on.
Although a bit wordy, these navigation methods are straightforward to use. They enable not only updating the selected item in an items control without explicitly referencing it, but any additional elements that want to display information about the current item can be automatically ...
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