Tag: expandablelistview xamarin.forms

当isVisible设置为true时,ListView不会更新

我试图做一个ListView与可点击的行。 当你点击一行时,它将一个子堆栈布局设置为可见性true。 这在Android中正常工作,但不是在iOS中。 也许我做错了。 我仍然是一个初学者,任何想法如何解决这个或任何其他更好的方法? 问题是,它在iOS上打开,所以可见性更改,但它不会更新单元格的高度。 例如,如果向上滚动,直到看不到已打开的单元格,然后向下滚动,单元格将在屏幕外更新。 你会看到它已经更新了高度。 我尝试使用自定义渲染器,但我不知道从哪里开始。 这是我的xaml: <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Lisa.Excelsis.Mobile.AssessmentPage" xmlns:local="clr-namespace:Lisa.Excelsis.Mobile;assembly=Lisa.Excelsis.Mobile"> <StackLayout> <local:SpecialListView x:Name="CategoryList" ItemsSource = "{Binding Categories}" HasUnevenRows="true" RowHeight="-1" GroupDisplayBinding="{Binding Name}" IsGroupingEnabled="true"> <local:SpecialListView.ItemTemplate> <DataTemplate> <ViewCell x:Name="ObservationCell"> <ViewCell.View> <StackLayout x:Name="ObservationContainer" HorizontalOptions="FillAndExpand" Orientation="Vertical" VerticalOptions="StartAndExpand" BackgroundColor="White"> <StackLayout x:Name="Observation" HorizontalOptions="FillAndExpand" VerticalOptions="StartAndExpand" Padding="15, 10, 10, 10" BackgroundColor="White"> <StackLayout.GestureRecognizers> <TapGestureRecognizer Tapped="OpenItem"/> </StackLayout.GestureRecognizers> <Grid […]