C
C#3mo ago
Mekasu0124

How To Set Vertical Snap Points on Avalonia ScrollViewer

<ScrollViewer Classes="NewUserScroll">
<Grid RowDefinitions="*,*,*,*">
<Border Classes="NewUserBorder" Grid.Row="0"></Border>
<Border Classes="NewUserBorder" Grid.Row="1"></Border>
<Border Classes="NewUserBorder" Grid.Row="2"></Border>
<Border Classes="NewUserBorder" Grid.Row="3"></Border>
</Grid>
</ScrollViewer>
<ScrollViewer Classes="NewUserScroll">
<Grid RowDefinitions="*,*,*,*">
<Border Classes="NewUserBorder" Grid.Row="0"></Border>
<Border Classes="NewUserBorder" Grid.Row="1"></Border>
<Border Classes="NewUserBorder" Grid.Row="2"></Border>
<Border Classes="NewUserBorder" Grid.Row="3"></Border>
</Grid>
</ScrollViewer>
I'm curious to know if this is such a thing. Basically what I'm wanting to do is when the user clicks the buttons to scroll, or uses their mouse wheel, it will either auto scroll or "jump" with a scroll animation to the nth child within each of the borders. Is there a way I can name the border's and achieve this? Thanks.
0 Replies
No replies yetBe the first to reply to this messageJoin