James
James

Reputation: 902

WinRT FlipView Scrolling Event

Is it possible to know, when a FlipView is sliding back or forth, what item is currently on screen? The only relevant event I can see is SelectionChanged, which only gets raised when the FlipView comes to a rest and not if the person is quickly flipping through multiple items. I want to implement a "page number" indicator that changes even when the FlipView has not come to a rest. I'm using C++/CX.

Upvotes: 2

Views: 865

Answers (2)

user2228621
user2228621

Reputation: 1

If all you want to do is show a page number, you could DataBind the TextView displaying the number to the FlipView's SelectedIndex property. You'll need to create a ValueConverter that adds 1 to the SelectedIndex, but that'll only take a minute.

Upvotes: 0

Filip Skakun
Filip Skakun

Reputation: 31724

You could check the ScrollViewer that is part of the control template of the FlipView. To get hold of the control - you would use the VisualTreeHelper to scan the visual tree looking for it. Then perhaps the ScrollViewer's ViewChanged event would let you see if the FlipView was manipulated.

Upvotes: 2

Related Questions