TextBox.CaretIndex Property

 

Gets or sets the insertion position index of the caret.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

member CaretIndex : int with get, set

Property Value

Type: System.Int32

The zero-based insertion position index of the caret.

Getting this property returns the current insertion position index of the caret (see TextPointer for information on terminology like "insertion position"). Setting this property moves the caret to the specified insertion position.

An insertion position is between either characters or element tags.

.NET Framework
Available since 3.0
Return to top
Show: