xamarin/Xamarin.Forms

Setting IsPullToRefreshedEnabled of a custom ListView through a XAML style does not work

Offen

#6.780 geöffnet am 04.07.2019

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (1.926 Forks)batch import
a/listviewa/stylee/4 :clock4:help wantedp/Androidp/iOS 🍎t/bug :bug:up-for-grabs

Repository-Metriken

Stars
 (5.644 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

I have a custom ListView that enables pull to refresh by default. If I use this class in XAML and set IsPullToRefreshEnabled to false through a style, it does NOT work.

Steps to Reproduce

  1. Run the attached repro on Android or iOS
  2. Observe that the background color of the list is set through the style
  3. Observe that pull to refresh is enabled by default in CustomListView
  4. Finally observe that pull to refresh is still enabled in MainPage's list even though the style wants to disable it

Expected Behavior

XAML styles should be able to override IsPullToRefreshEnabled in a custom control

Actual Behavior

Styles cannot override IsPullToRefreshEnabled.

Reproduction Link

App14.zip

Contributor Guide