Skip to content

How to Make Scrollable Areas "pan with Touch or Mouse Drag"? #7474

Answered by kekekeks
najak3d asked this question in Q&A
Discussion options

You must be logged in to vote

ScrollViewer enables touch-based scrolling out of the box. You can enable it for custom controls by adding ScrollGestureRecognizer like this:

<ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" />
</ScrollContentPresenter.GestureRecognizers>

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@najak3d
Comment options

@nettlep
Comment options

@thevortexcloud
Comment options

@nettlep
Comment options

Answer selected by najak3d
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants