xamarin/Xamarin.Forms

[Bug] ListView Scrolled event doesn't reset ScrollY when clearing ItemsSource

開放

#8,305 建立於 2019年10月30日

 (2 則留言) (2 個反應) (0 位負責人)C# (1,926 個分叉)batch import
a/listviewe/2 :clock2:good first issuehackathonhelp wantedin-progressinactivep/Androidt/bug :bug:up-for-grabs

倉庫指標

星標
 (5,644 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Description

Not sure if this is a bug or what, but when you clear the listview's ItemsSource, the Scrolled event's coordinate doesn't reset to 0

Steps to Reproduce

Referring to the enclosed project:

  1. Scroll down the list view and take note of the ScrollY value InShot_20191030_213157753

  2. Click on the Clear button to clear the ItemsSource

  3. Click on the Add button to add items to the ItemsSource

Expected Behavior

The ScrollY should be reset to 0 when ItemsSource is cleared

Actual Behavior

The ScrollY resume from the previous value

Basic Information

  • Version with issue:
  • IDE: Visual Studio 2019 Community 16.3.4
  • Platform Target Frameworks:
    • Android: 10.0.3.0
  • Nuget Packages: Xamarin Form 4.3.0.947036

Reproduction Link

App3.zip

貢獻者指南