Using GetLineStartPosition to get the end of a line in WPF RichTextBox.
- by Alan Spark
A bit of background. I would like to be able to process text for the line that the caret is on in a WPF RichTextBox. Please see my earlier question about the TextPointer class: http://stackoverflow.com/questions/3046162/how-to-keep-track-of-textpointer-in-wpf-richtextbox.
I know how to get the TextPointer at the start of the current line by using GetLineStartPosition with 0 as the argument but would now like to get the TextPointer at the end of the line. It was suggested in my previous question that this is possible using the GetLineStartPosition method.
I would appreciate it if someone can explain a bit about how the GetLineStartPosition works with regard to end of line pointers.
Thanks in advance for any help.