Navigating
In this context, navigating a view refers to managing the current item. 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 updated as well, as long as they bind to the same source. If you paste a second, ...
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