Returns the zero-based insertion index for the specified point.
Assembly: PresentationFramework (in PresentationFramework.dll)
- Type: System.Windows.Point
A point in TextBox coordinate-space for which to return an insertion index.
- Type: System.Boolean
true to return the nearest insertion index if there is no character at the specified point; false to return –1 if there is no character at the specified point.
Return ValueType: System.Int32
The insertion index for the specified point, or –1 if no valid insertion index can be found.
An insertion index references a position between characters; contrast with a character index, which references specific characters. Text that is N characters long has N+1 possible insertion indexes. An insertion index of M could mean the given point is in the right half of the character to the left of M, or on the left half of the point to the right of M.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003