此代码在iOS和Android上正常运行,但在Windows 10移动设备上无法运行(Microsoft Lumia 650,版本:1511,版本:10.0.10586.11):
public App()
{
var layout = new StackLayout
{
Orientation = StackOrientation.Vertical,
Padding = 0,
Children =
{
new Button { Text = "A" },
new Button { Text = "B" },
new Button { Text = "C" },
new Button { Text = "D" },
new Button { Text = "E" },
new Button { Text = "F" },
new Button { Text = "G" },
new Button { Text = "H" },
new Button { Text = "I" },
new Button { Text = "J" },
new Button { Text = "K" },
new Button { Text = "L" },
new Button { Text = "M" },
new Button { Text = "N" },
new Button { Text = "O" },
new Button { Text = "P" },
new Button { Text = "Q" },
new Button { Text = "R" },
new Button { Text = "S" },
new Button { Text = "T" },
new Button { Text = "U" },
new Button { Text = "V" },
new Button { Text = "W" },
new Button { Text = "X" },
new Button { Text = "Y" },
new Button { Text = "Z" },
},
};
var scrollView = new ScrollView { Content = layout };
// The root page of your application
MainPage = new ContentPage
{
Content = scrollView,
};
}
滚动视图根本不滚动。我可以看到滚动条,但它不会滚动。我尝试使用HorizontalOptions
/ VerticalOptions
,但这也没有帮助。在模拟器中,它通过滚动鼠标来工作。 Label
也会出现同样的问题。
这里有什么问题?
答案 0 :(得分:1)
已在Xamarin Forms 2.1.0中修复。