【发布时间】:2016-08-15 03:34:46
【问题描述】:
我正在阅读Xamarin Mobile App Development by Apress 并且遗漏了一些东西。我删除了这段代码,去掉了不必要的东西:
public ContentPageExample()
{
var layout = new StackLayout
{
Children =
{
// bunch of "View"s here
},
HeightRequest = 1500
};
ScrollView scrollView = new ScrollView
{
VerticalOptions = LayoutOptions.FillAndExpand,
Content = layout
};
this.Content = scrollView;
}
但是,内容不会滚动。我在WinPhone 和Android 模拟器中都试过了(没有Mac 方便尝试iPhone 一个)。书上说东西应该滚动。我错过了什么?
【问题讨论】:
-
使用
Android模拟器对我来说确实滚动得很好。 -
我在 Android 手机、模拟器和 WinPhone 模拟器上尝试过,它对我来说运行正常
标签: c# xamarin xamarin.android xamarin.forms xamarin.winphone