문제

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