I have this control that is mainly a collectionview and occasionally I have to use changes elsewhere to scroll the collectionview, so I exposed a ScrollTo method which I am triggering when an event in another control is called.
I only tested on android.
I followed breakpoints and ScrollTo is being called but no scrolling happens, (scrolling actually doesnt work also when the page is loaded, or when on appearing calls it in the page that implements the control, for the first one I saw the response, and since its a contentview and not contentpage I dont have OnAppearing to use) I have an OnScrolled Event Attached that isn't called as well.
I am also sure it is meant to scroll as the index I am calling is not the one I have;
public void ScrollToOffset(int Offset, bool animate = true)
int index = currentIndex + Offset;
collectionView.ScrollTo(index: index, animate: animate);
public void OnEvent(object sender, EventArgs e)
I verified it is calling on UI thread by using
Device.BeginInvokeOnMainThread() and trying to Focus the objects doesn't seem to help.
The call I placed in the OnAppearing does seem to work when is called by HotReload but the one called by the event still doesn't work.