Is it possible to load next\previous item in FlipView on demand? Lets say I display an Item and will download next one only when user press left\right button?

FlipView has Items and ItemsSource properties, but in such case I have to specify full collection of items at once instead of downloading them one by one.

有帮助吗?

解决方案

Use an ObservableCollection for the ItemsSource property on your FlipView. You can subscribe to the SelectionChanged event on your FlipView:

private void FlipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    //
}

In this handler, you can get the current index and decide if you have to load the next item or not (i.e. if the index is Count - 1 of your collection).

Beware that when adding an item to the collection, the event will fire and your handler will be called.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top