I need to get the maximum value of a richtextbox’s vertical scrollbar so that I can scroll to a percentage of the scrollbar’s maximum value.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way I’ve done it, I have the RichTextBox inside of a ScrollViewer, e.g.
Then from code-behind, you can read the value of sv.ExtentHeight, take a percentage of it, and then call sv.ScrollToVerticalOffset() to move the scrollbar to that position.