in FlowDocument,how to relocate the cursor while editing ?
after some special editing, I want the cursor to go to a specific location,such as the end or the 5th space in the second line. how can I relocate it ?
Thanks in advance.
after some special editing, I want the cursor to go to a specific location,such as the end or the 5th space in the second line. how can I relocate it ?
Thanks in advance.
As Lester said setting RichTextBox.CaretPosition will set the caret location.
You can use the TextPointer methods http://msdn2.microsoft.com/en-us/library/system.windows.documents.textpointer_members.aspx to navigate to the position you want.