CaretPosition Constructor (VirtualSnapshotPoint, IMappingPoint^, PositionAffinity)

 

Initializes a new instance of a CaretPosition.

Namespace:   Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

public:
CaretPosition(
	VirtualSnapshotPoint bufferPosition,
	IMappingPoint^ mappingPoint,
	PositionAffinity caretAffinity
)

Parameters

bufferPosition
Type: Microsoft.VisualStudio.Text::VirtualSnapshotPoint

The index of the caret. The index corresponds to a gap between two characters in the underlying ITextBuffer.

mappingPoint
Type: Microsoft.VisualStudio.Text::IMappingPoint^

A mapping point for the caret that can be used to find its position in any buffer.

caretAffinity
Type: Microsoft.VisualStudio.Text::PositionAffinity

The PositionAffinity of the caret. The caret can have an affinity with the preceding edge of the gap or the following edge of the gap.

Return to top
Show: