[英]How can I make a ContentPage with a StackLayout inside scrollable?
這是我的代碼:
<ContentPage>
<ContentPage.Content>
<StackLayout Spacing="10" Margin="20">
<Label />
<Label />
<Label />
.....
<Label />
<Label />
</StackLayout>
</ContentPage.Content>
</ContentPage>
有很多標簽,很多標簽都會脫離屏幕的最后。 但屏幕不會滾動。 如何使其可滾動?
<ContentPage.Content>
<ScrollView>
<StackLayout>
<Label />
<Label />
<Label />
<Entry />
</StackLayout>
</ScrollView>
</ContentPage.Content>
如果你只有標簽並且它們非常簡單,為什么不使用具有隱式滾動的ListView? 否則Cole Xia是正確的,包裝在ScrollView中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.