I'm having a vertical list view which has in its item template another list view in horizontal position, now everything works fine, but I want to be able to scroll all of these sub list views if one of them scrolled.
Now I want all the sub list views in all rows to scroll together. How can I do this?!
Maybe I can make an extending class for the list view with bindable property for scrolling ?! Something like this:
public class ScrollableListView : ListView {
public static readonly BindableProperty ScrollProperty = BindableProperty.Create("ScrollPosition", typeof(double), typeof(ScrollableListView));
public double ScrollPosition
{
get { return (double)GetValue(ScrollProperty ); }
set
{
SetValue(ScrollProperty, value);
ScrollToAsync(0, value);
}
}
}
And then in xaml bind all ScrollPosition property to a variable that changes whenever a list is scrolled, like this:
<DataTemplate>
<RelativeLayout HeightRequest="{Binding Width}" Margin="{Binding Margin}">
<Grid Rotation="90" AnchorX="0" AnchorY="0"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}">
<Local:ScrollableListView ScrollPosition="{Binding SPos}" Scrolled="Generic_Scroll_Event"/>
</Grid>
</RelativeLayout>
</DataTemplate>
And in the Generic_Scroll_Event The SPos variable changes to the event sender's position.
This is just something that popped in my head ... Any help is appreciated anyway ^^.

ScrollTofunctions doesn't take position -_- instead, an item to scroll to...