Hello,
how I can or what is the value definition. mainly if I want to jump to line 12 which value I should use
Because Label
do not have method to get the lines, we can do this by using Label's fontSize and add default padding (10) to get the text line height, then multiply by 12 like following code.
MyScrollVIew.ScrollToAsync(0, (MyLabel.FontSize+10)*12, false);
My XAML layout like following.
<ScrollView x:Name="MyScrollVIew" HeightRequest="100">
<Label x:Name="MyLabel" FontSize="Title"></Label>
</ScrollView>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.