【发布时间】:2020-03-27 06:05:50
【问题描述】:
我有一个固定行高的列表视图。在列表视图中有带有大描述的标签。我正在尝试使此标签能够滚动。谁能帮忙。
<ListView ItemsSource="{Binding ServiceList, Mode=TwoWay}" RowHeight="100">
<ListView.ItemTemplate>
<DataTemplate x:DataType="models:ServiceModel">
<ViewCell>
<ScrollView
Margin="0"
Padding="0"
HeightRequest="50">
<Label
LineBreakMode="WordWrap"
Style="{StaticResource blackColorLabel}"
Text="{Binding ServiceDescription}" />
</ScrollView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
【问题讨论】:
-
你不能有多个滚动,ListView 有自己的滚动添加一个滚动视图只是增加了问题!你的要求不能通过其他方式实现吗
-
Listview已经滚动事件。请不要在Listview中使用ScrollView,滚动手势会混淆目标位置。 -
你能建议我任何其他方式吗?我了解列表视图和滚动视图不能一起使用。任何第三方插件或使我能够在每个单元格中显示大量文本的东西。我无法更改每个单元格的大小。它是固定的。
标签: xamarin xamarin.forms collectionviewsource