【发布时间】:2017-08-31 00:11:30
【问题描述】:
我正在开发 Xamarin.Forms 中的跨平台应用程序。这是 ContentPage 的布局:
<ContentPage.Content>
<ScrollView x:Name="svMarket">
<AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand">
</StackLayout>
<StackLayout x:Name="overLay" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All" IsVisible="false" BackgroundColor="#C0808080">
</StackLayout>
</AbsoluteLayout>
</ScrollView>
</ContentPage.Content>
内容是在运行时添加的,页面可能会变得很长。 Scrollview 让我们只滚动页面的一小部分,页面上的其余内容是不可见的。此问题仅在 iOS 版本中出现。在android上测试时可以正常工作。
第二个 stacklayout 仅用作叠加层。第一个 stacklayout 里面有很多网格控件,内容是添加到网格里面的。
【问题讨论】:
-
您找到解决方案了吗?我面临着类似的问题。
-
查看答案
标签: .net xaml xamarin.forms