roubachof/Sharpnado.CollectionView

I can't find the ScrollTo api

Closed this issue · 3 comments

This is a great library, a lot of functionality. But it seems to have no ScrollTo method, and that's very weird! Is it possible to add this method?

I figured out how to organize scrolling. It is necessary to change the CurrentIndex.
I want to note that this is not an intuitive api. It would be great to add ScrollTo method for more similarity with classic CollectionView.
Also unfortunately there is no scroll animation, it's very sad.

you can ease your sadness by providing a PR 😅

just added a scrollTo method:

    public bool AnimateScroll { get; set; }

    public void ScrollTo(int index, bool animateScroll = true)
    {
        AnimateScroll = animateScroll;
        CurrentIndex = index;
    }

I'm not sure scroll animation will work on android though