Answered by:
How to pass gesture to a View?

Question
-
User390853 posted
I have a stackLayout and collectionView.and put the StackLayout cover the collectionView and make it transparent. So if I scroll the StackLayout can I pass the "scroll" to the collectionView?to make it scorlled.
Monday, February 3, 2020 1:31 PM
Answers
-
User390853 posted
@ColeX said:
@lescper said:
@ColeX said: 1 . ScrollView can be scrolled , but not StackLayout .
2 . Where you find
SendScroll
? which class does the method belong to ?Thank you for your reply. I find other solutions to do it.
Can you post your solution here and mark it as answer ?
I put the stacklayout down of the collectionView and add another stacklayout above the collection if needed and remove it if not needed
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, February 4, 2020 2:35 AM
All replies
-
User390978 posted
@lescper ,
If you are doing gesture action other than
CollectionView
region in theStackLayout
, you can't pass the gesture toCollectionView
because it won't be layout on that region.You can use the
ScrollTo
method ofCollectionView
to achieve your requirement.https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/collectionview/scrolling#scroll-an-item-into-view
Monday, February 3, 2020 1:36 PM -
User390853 posted
@Dinesh_Official said: @lescper ,
If you are doing gesture action other than
CollectionView
region in theStackLayout
, you can't pass the gesture toCollectionView
because it won't be layout on that region.You can use the
ScrollTo
method ofCollectionView
to achieve your requirement.I find that there is a SendScroll method can I use it?
Tuesday, February 4, 2020 1:16 AM -
User369978 posted
1 . ScrollView can be scrolled , but not StackLayout .
2 . Where you find
SendScroll
? which class does the method belong to ?Tuesday, February 4, 2020 1:54 AM -
User390853 posted
@ColeX said: 1 . ScrollView can be scrolled , but not StackLayout .
2 . Where you find
SendScroll
? which class does the method belong to ?Thank you for your reply. I find other solutions to do it.
Tuesday, February 4, 2020 2:17 AM -
User369978 posted
@lescper said:
@ColeX said: 1 . ScrollView can be scrolled , but not StackLayout .
2 . Where you find
SendScroll
? which class does the method belong to ?Thank you for your reply. I find other solutions to do it.
Can you post your solution here and mark it as answer ?
Tuesday, February 4, 2020 2:19 AM -
User390853 posted
@ColeX said:
@lescper said:
@ColeX said: 1 . ScrollView can be scrolled , but not StackLayout .
2 . Where you find
SendScroll
? which class does the method belong to ?Thank you for your reply. I find other solutions to do it.
Can you post your solution here and mark it as answer ?
I put the stacklayout down of the collectionView and add another stacklayout above the collection if needed and remove it if not needed
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, February 4, 2020 2:35 AM