ListView iOS - height isn't updated if a child's visibility changed
#4,184 创建于 2018年10月23日
仓库指标
- 星标
- (5,644 个星标)
- PR 合并指标
- (30 天内没有已合并 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
