xamarin-forms-carouselview icon indicating copy to clipboard operation
xamarin-forms-carouselview copied to clipboard

More like a question

Open alexrainman opened this issue 10 years ago • 0 comments

Chris, i was able to tweak your component to receive a List<Type> as ItemsSource and it works nice for my needs.

I have a question for you:

void UpdateSelectedIndex ()
{
    // WHAT IS THIS LINE FOR?
    if (SelectedItem == BindingContext) return;

    SelectedIndex = Children
        .Select (c => c.BindingContext)
        .ToList ()
        .IndexOf (SelectedItem);
}

alexrainman avatar Nov 20 '15 22:11 alexrainman