[英]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.