Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of a CaretPosition.
Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaration
Public Sub New ( _
    bufferPosition As VirtualSnapshotPoint, _
    mappingPoint As IMappingPoint, _
    caretAffinity As PositionAffinity _
)
public CaretPosition(
    VirtualSnapshotPoint bufferPosition,
    IMappingPoint mappingPoint,
    PositionAffinity caretAffinity
)
public:
CaretPosition(
    VirtualSnapshotPoint bufferPosition, 
    IMappingPoint^ mappingPoint, 
    PositionAffinity caretAffinity
)
new : 
        bufferPosition:VirtualSnapshotPoint * 
        mappingPoint:IMappingPoint * 
        caretAffinity:PositionAffinity -> CaretPosition
public function CaretPosition(
    bufferPosition : VirtualSnapshotPoint, 
    mappingPoint : IMappingPoint, 
    caretAffinity : PositionAffinity
)
Parameters
bufferPosition
Type: Microsoft.VisualStudio.Text.VirtualSnapshotPointThe index of the caret. The index corresponds to a gap between two characters in the underlying ITextBuffer.
mappingPoint
Type: Microsoft.VisualStudio.Text.IMappingPointA mapping point for the caret that can be used to find its position in any buffer.
caretAffinity
Type: Microsoft.VisualStudio.Text.PositionAffinityThe PositionAffinity of the caret. The caret can have an affinity with the preceding edge of the gap or the following edge of the gap.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.