【发布时间】:2021-05-04 04:17:09
【问题描述】:
我在 Xamarin Forms 中创建了一个水平/垂直滚动视图,其中包含多种类型的子项,例如:
- 标签
- 自定义复选框
- 图像视图
- 选择器
- 滑块
这是我的代码:
ScrollView scrollTracks = new ScrollView
{
BackgroundColor = Color.Black,
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
Content = layoutTracks,
Orientation = ScrollOrientation.Both
};
当我单击一些子元素(如 CustomCheckboxes、Labels 或 ImageViews)时,程序会自动将视图滚动到开头。
我在 UWP 平台上对此进行了测试。
我怎样才能让程序停止这样做?
【问题讨论】:
标签: xamarin xamarin.forms click scrollview touch