Forum Xamarin.Forms

How to detect listview is scrolling up in Xamarin Forms IOS

Harrison_NguyenHarrison_Nguyen Member ✭✭
edited July 2019 in Xamarin.Forms

I have this code to detect but only fire when scroll down for both method ItemAppearing and ItemDisappearing. Anyone please help

public MatchDetailListView() : base(ListViewCachingStrategy.RecycleElement)
    {
        ItemAppearing += MatchDetailListView_ItemAppearing;
        ItemDisappearing += MatchDetailListView_ItemDisappearing;
    }

    private void MatchDetailListView_ItemDisappearing(object sender, ItemVisibilityEventArgs e)
    {
    }

    private void MatchDetailListView_ItemAppearing(object sender, ItemVisibilityEventArgs e)
    {
        if (e.ItemIndex == 0)
        {
            MessagingCenter.Send(nameof(MatchDetailListView), "ScrollDown");
        }
    }
Tagged:

Answers

Sign In or Register to comment.