GetNextCaretPosition Method (textSource, offset, direction, mode)
NamespacesICSharpCode.AvalonEdit.DocumentTextUtilitiesGetNextCaretPosition(ITextSource, Int32, LogicalDirection, CaretPositioningMode)
Gets the next caret position.
Declaration Syntax
C#Visual BasicVisual C++
public static int GetNextCaretPosition(
	ITextSource textSource,
	int offset,
	LogicalDirection direction,
	CaretPositioningMode mode
Public Shared Function GetNextCaretPosition ( _
	textSource As ITextSource, _
	offset As Integer, _
	direction As LogicalDirection, _
	mode As CaretPositioningMode _
) As Integer
static int GetNextCaretPosition(
	ITextSource^ textSource, 
	int offset, 
	LogicalDirection direction, 
	CaretPositioningMode mode
textSource (ITextSource)
The text source.
offset (Int32)
The start offset inside the text source.
direction (LogicalDirection)
The search direction (forwards or backwards).
mode (CaretPositioningMode)
The mode for caret positioning.
Return Value
The offset of the next caret position, or -1 if there is no further caret position in the text source.
This method is NOT equivalent to the actual caret movement when using VisualLine.GetNextCaretPosition. In real caret movement, there are additional caret stops at line starts and ends. This method treats linefeeds as simple whitespace.

Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: