问题
I'm looking for an example code how to jump to a specific line of a RichTextBox
in WPF.
I have no idea how to do this, in winForms it is very simple because I'm free to can set SelectionStart and SelectionLength that unlike in WPF the equivalent properties are read only.
回答1:
You have some options in the API:
- LineDown
- ScrollToVerticalOffset
- ScrollToEnd
来源:https://stackoverflow.com/questions/9013029/how-do-i-jump-to-a-specific-line-in-a-richtextbox