xamarin/Xamarin.Forms

ListView iOS - height isn't updated if a child's visibility changed

オープン

#4,184 opened on 2018/10/23

 (7 件のコメント) (3 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/layouta/listviewe/6 :clock6:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

ListView on iOS is still a nightmare... Having a sub element inside the cell's dataTemplate which has its visibility binded won't update its height... Tired of doing workaround or telling every Xamarin Forms haters that it will work someday...

Steps to Reproduce

Have a ListView bounded to a list of item where the item has a IsVisible or IsSelected property with INPC. Have a template like this :

<DataTemplate>

    <StackLayout>
        <!-- some content always visible -->
        <StackLayout IsVisible="{Binding IsVisible or IsSelected}">
            <!-- some contextual content-->
        </StackLayout>
    </StackLayout>
</DataTemplate>

You can replace the StackLayout with a Grid and rows with height="Auto" it will result the same.

Expected Behavior

The height of the cell should be updated. Or at least there should be an available property / event / method to tell the listView that a particularCell(object particularCell == SelectedItemIfNothingProvidedInParameter).

Actual Behavior

The height isn't updated and the contextual / additional content isn't displayed.

Basic Information

  • Version with issue: anyone
  • Last known good version: i don't think it ever worked once.
  • IDE: any IDE
  • Platform Target Frameworks:
    • iOS: any iOS framework
    • Android: The bug is only iOS specific.
  • Affected Devices: every iphone

Screenshots

image

コントリビューターガイド