Xamarin在Scrollview中形成Listview不';卷轴
Xamarin在Scrollview中形成Listview不';卷轴,listview,xamarin,scrollview,xamarin.forms,Listview,Xamarin,Scrollview,Xamarin.forms,当我的屏幕太小时,我的listview不想滚动。如果我的屏幕不太小,则listview会滚动。有人能帮我吗?不要在ScrollView中堆叠ListView,因为两者至少都在Android上实现滚动。文档中说: 应用程序开发人员不应该将一个ScrollView嵌套在另一个ScrollView中。此外,它们应该避免嵌套其他可以滚动的元素,例如WebView 将ListView滚动到项目。将StackLayout放在ListView.Header或ListView.Footer中 当屏幕太小时,如
当我的屏幕太小时,我的listview不想滚动。如果我的屏幕不太小,则listview会滚动。有人能帮我吗?不要在ScrollView中堆叠ListView,因为两者至少都在Android上实现滚动。文档中说: 应用程序开发人员不应该将一个ScrollView嵌套在另一个ScrollView中。此外,它们应该避免嵌套其他可以滚动的元素,例如WebView
将ListView滚动到项目。将StackLayout放在ListView.Header或ListView.Footer中
当屏幕太小时,如何使屏幕可滚动?有不同的选项,例如,您可以在堆栈布局中使用ScrollView,然后将上面/下面的内容设置为ListView的页眉/页脚。XF没有提供ItemsControl
选项,这太愚蠢了。
<?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="Dh.ListPage">
<ContentPage.Content>
<ScrollView>
<StackLayout Style="{StaticResource MainStackLayoutWhenLoggedInStyle}">
<Frame Style="{StaticResource FrameStyle2}">
<StackLayout>
<Label Text="Vragenlijsten" Style="{StaticResource TitelLabelStyle}" />
</StackLayout>
</Frame>
<Frame Style="{StaticResource FrameStyle2}">
<StackLayout>
<Label Text="DRINGENDE VRAGEN: vul deze vragen meteen in!" Style="{StaticResource StandardLabelStyle}"/>
<Frame Style="{StaticResource FrameStyle2}">
<StackLayout Style="{StaticResource ListViewStackLayoutStyle}" >
<ListView ItemTapped="OnItemTapped" ItemsSource="{Binding Question_Lists}" Style="{StaticResource StandardListViewStyle}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Label Text="{Binding Title}" Style="{StaticResource StandardLabelStyle}" />
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</StackLayout>
</ScrollView>
</ContentPage.Content>