Infi Xu
Infi Xu

Reputation: 45

RichTextBlock scroll to specified offset

I have a RichTextBlock in a ScrollViewer. The content of the RichTextBlock is very long. How can I scroll to the specifed Offset (the offset of RichTextBlock) in code-behind?

Upvotes: 1

Views: 147

Answers (1)

Arun Selva Kumar
Arun Selva Kumar

Reputation: 2732

ScrollViewer does not have a Setter Property for VerticalOffset - However it provides with a Public Method to achieve your requirement.

_ScrollViewer.SetVerticalOffset(40.0);

Cheers!

Upvotes: 1

Related Questions