This documentation is archived and is not being maintained.

TextPointer Members

Represents a position within a FlowDocument or TextBlock.

The following tables list the members exposed by the TextPointer type.

  Name Description
Public property DocumentEnd Gets a TextPointer at the end of content in the text container associated with the current position.
Public property DocumentStart Gets a TextPointer at the beginning of content in the text container associated with the current position.
Public property HasValidLayout Gets a value that indicates whether the text container associated with the current position has a valid (up-to-date) layout.
Public property IsAtInsertionPosition Gets a value that indicates whether or not the current position is an insertion position.
Public property IsAtLineStartPosition Gets a value that indicate whether or not the current position is a the beginning of a line.
Public property LogicalDirection Gets the logical direction associated with the current position which is used to disambiguate content associated with the current position.
Public property Paragraph Gets the paragraph that scopes the current position, if any.
Public property Parent Gets the logical parent that scopes the current position.
Top

(see also Protected Methods )
  Name Description
Public method CompareTo Performs an ordinal comparison between the positions specified by this TextPointer and a second specified TextPointer.
Public method DeleteTextInRun Deletes a specified number of characters from the position indicated by this TextPointer.
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetAdjacentElement Returns the element, if any, bordering this TextPointer in a specified logical direction.
Public method GetCharacterRect Returns a bounding box (Rect) for content bordering this TextPointer in a specified logical direction.
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetInsertionPosition Returns a TextPointer to the closest insertion position in a specified logical direction.
Public method GetLineStartPosition Overloaded. Returns a TextPointer to the beginning of a specified line, the line is specified relative to the position pointed to by this TextPointer.
Public method GetNextContextPosition Returns a pointer to the next symbol (see remarks section) in a specified logical direction.
Public method GetNextInsertionPosition Returns a TextPointer to the next insertion position in a specified logical direction.
Public method GetOffsetToPosition Returns the count of symbols between this TextPointer and a second specified TextPointer.
Public method GetPointerContext Returns a category indicator for the content adjacent to this TextPointer in a specified logical direction.
Public method GetPositionAtOffset Overloaded. Returns a TextPointer to the position indicated by a specified offset, in symbols, from the beginning of content.
Public method GetTextInRun Overloaded. Returns text adjacent to this TextPointer.
Public method GetTextRunLength Returns the number of Unicode characters between this TextPointer and the next non-text symbol, in a specified logical direction.
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method InsertLineBreak Inserts a line break at the current position.
Public method InsertParagraphBreak Inserts a paragraph break at the current position.
Public method InsertTextInRun Inserts text (specified by a string) into the text Run at the current position.
Public method IsInSameDocument Determines whether or not a specified position is in the same text container as the current position.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method ToString Overridden. This type or member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.
Top

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Top
Show: