【发布时间】:2014-11-10 07:42:25
【问题描述】:
我想使用下面提到的代码和绑定在 iOS 设备的 XAML 文件中设置 ListView 的高度。
- 我使用 observable 集合来通知属性值何时更新,它会收到通知并设置正确的值,但它没有反映在 iOS 模拟器或设备中,但适用于 Android 和 Windows Phone 设备。
<ListView Grid.Row="2" Grid.Column="1" ItemsSource="{Binding QuestionAnswerList,Mode=TwoWay}" SelectedItem="{Binding SelectedData,Mode=TwoWay}"
HasUnevenRows="true"
RowHeight="{Binding Custom_height,Mode=TwoWay}"
BackgroundColor="Silver"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<ListView.ItemTemplate>
-
我也尝试静态设置列表视图的行高,但这也不起作用。
-
我没有给出任何高度并设置了 Grid RowDefinition height = "*" 但它也没有设置 ListView 的高度,而是与下一个 ListView 行的细节重叠。
谢谢。
【问题讨论】:
标签: ios iphone ipad xamarin xamarin.forms