Xamarin Forms Listview in Scrollview doesn't scroll

前端 未结 3 914
情书的邮戳
情书的邮戳 2021-01-19 07:06



        
相关标签:
3条回答
  • 2021-01-19 07:07

    Put your StackLayout in ListView.Header or ListView.Footer

    <ListView ItemsSource="{Binding Comments}">
        <ListView.Header>
            <StackLayout Padding="30,30,30,0">
                <Label Text="Article" />
            </StackLayout>
        </ListView.Header>
        <ListView.Footer>
            <StackLayout HeightRequest="85" />
        </ListView.Footer>
    </ListView>
    
    0 讨论(0)
  • 2021-01-19 07:14

    Xamarin.Forms.ScrollView Class documentation says:

    Application developers should not nest one ScrollView within another. Additionally, they should refrain from nesting them other elements that can scroll, such as WebView.

    ListView.ScrollTo Method Scrolls the ListView to the item.

    0 讨论(0)
  • 2021-01-19 07:24

    Never stack a ListView inside a ScrollView as both implement scrolling on Android at least.

    0 讨论(0)
提交回复
热议问题