I found this issue where the card view's CurrentItem doesn't update if the currently active card is removed from the ItemsSource. I haven't verified but I guess the same thing will happen if a card is added to the collection before the current card.
I added the following workaround to my code for now:
public void HackRefreshCardsViewCurrentItem()
{
object selectedItem = null;
int index = 0;
foreach (var item in this.cards.ItemsSource)
{
if (index++ == this.cards.SelectedIndex)
{
selectedItem = item;
break;
}
}
this.cards.SelectedItem = selectedItem;
}
... which I call whenever I change the card view's ItemsSource (ie it forcefully refreshes the SelectedItem).
Would be great if this was fixed so I could remove my hack! My card view is in the PanCardView mode.
Hi, and thanks for a great component!
I found this issue where the card view's CurrentItem doesn't update if the currently active card is removed from the ItemsSource. I haven't verified but I guess the same thing will happen if a card is added to the collection before the current card.
I added the following workaround to my code for now:
... which I call whenever I change the card view's ItemsSource (ie it forcefully refreshes the SelectedItem).
Would be great if this was fixed so I could remove my hack! My card view is in the PanCardView mode.
Thanks so much!