Xamarin.Forms:ScrollView 在 Windows 10 Mobile 上不滚动
Xamarin.Forms: ScrollView not scrolling on Windows 10 Mobile
此代码在 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
.
也会出现同样的问题
这里有什么问题?
已在 Xamarin Forms 2.1.0 中修复。
此代码在 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
.
这里有什么问题?
已在 Xamarin Forms 2.1.0 中修复。