Compartilhar via


CaretPosition(VirtualSnapshotPoint, IMappingPoint, PositionAffinity) Constructor

Definition

Initializes a new instance of a CaretPosition.

public:
 CaretPosition(Microsoft::VisualStudio::Text::VirtualSnapshotPoint bufferPosition, Microsoft::VisualStudio::Text::IMappingPoint ^ mappingPoint, Microsoft::VisualStudio::Text::PositionAffinity caretAffinity);
public CaretPosition (Microsoft.VisualStudio.Text.VirtualSnapshotPoint bufferPosition, Microsoft.VisualStudio.Text.IMappingPoint mappingPoint, Microsoft.VisualStudio.Text.PositionAffinity caretAffinity);
new Microsoft.VisualStudio.Text.Editor.CaretPosition : Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.IMappingPoint * Microsoft.VisualStudio.Text.PositionAffinity -> Microsoft.VisualStudio.Text.Editor.CaretPosition
Public Sub New (bufferPosition As VirtualSnapshotPoint, mappingPoint As IMappingPoint, caretAffinity As PositionAffinity)

Parameters

bufferPosition
VirtualSnapshotPoint

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

mappingPoint
IMappingPoint

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

caretAffinity
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.

Applies to