xamarin/Xamarin.Forms

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

Aperta

#8305 aperta il 30 ott 2019

 (2 commenti) (2 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/listviewe/2 :clock2:good first issuehackathonhelp wantedin-progressinactivep/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor