RichTextBox::CaretPosition Property
.NET Framework (current version)
Gets or sets the position of the input caret.
Assembly: PresentationFramework (in PresentationFramework.dll)
public: property TextPointer^ CaretPosition { TextPointer^ get(); void set(TextPointer^ value); }
Property Value
Type: System.Windows.Documents::TextPointer^A TextPointer object specifying the position of the input caret.
By default, the caret is at the first insertion position at the beginning of the content hosted by the RichTextBox. See TextPointer for more information on text position terminology like "insertion position".
| Exception | Condition |
|---|---|
| ArgumentNullException | An attempt is made to set this property to null. |
| ArgumentException | An attempt is made to set this property to a TextPointer that references a position outside of the current document. |
.NET Framework
Available since 3.0
Available since 3.0
Show: