FlowDocument doc = new FlowDocument(new Paragraph(new Run("Hello World!"))); ITextPointer pointer = doc.ContentStart.CreatePointer(LogicalDirection.Forward);
RichTextBox rtb = new RichTextBox(); TextPointer start = rtb.Document.ContentStart; TextPointer end = rtb.Document.ContentEnd;This code creates a new RichTextBox control and retrieves the start and end ITextPointer instances for the contents of the control. Overall, the ITextPointer class and the CreatePointer() method provide a powerful set of tools for working with and manipulating flow content documents in WPF.