Skip to content

Bind ListView.IsRefreshing is not work. #28514

Open
bill2004158/maui
#1
@bill2004158

Description

@bill2004158

Description

<ListView IsRefreshing={Binding IsLoadingData}> </ListView>

after loaded data, the app set viewmodel.IsLoadingData to false,
but the loading indicator still shown.

Explanation:
https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/ListView/ListView.cs#L361C4-L361C12

  1. ListView set the IsRefreshing property without specify SetterSpecificity, thus SetterSpecificity.ManualValueSetter will be used.
  2. while for {Binding}, it will use SetterSpecificity.FromBinding, which has low priority than ManualValueSetter.
  3. thus ListView won't raise PropertyChanged event for IsRefreshing after changed value in viewmodel.
  4. finally, then Handler/Renderer won't hide the refreshing indicator.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android, iOS, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

all

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-listviewListView and TableViews/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions