I created a Horizontal / Vertical Scrollview in Xamarin Forms that contains several types of childs like:
Here is my code:
ScrollView scrollTracks = new ScrollView
{
BackgroundColor = Color.Black,
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
Content = layoutTracks,
Orientation = ScrollOrientation.Both
};
When I click some child elements like the CustomCheckboxes, or the Labels, or the ImageViews, the program scroll automatically the view to the beginning.
I tested this on the UWP platform.
How can I make the program to stop doing this?
Add this tag to the ScrollView solved my issue:
IsTabStop = false
Here the code:
ScrollView scrollTracks = new ScrollView
{
BackgroundColor = Color.Black,
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
Content = layoutTracks,
Orientation = ScrollOrientation.Both,
IsTabStop = false
};