Прочитать на английском

Поделиться через


ITextViewModel.IsPointInVisualBuffer Method

Determines whether a point in the edit buffer is represented in the visual buffer.

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

Syntax

bool IsPointInVisualBuffer(
    SnapshotPoint editBufferPoint,
    PositionAffinity affinity
)

Parameters

  • affinity
    Type: Microsoft.VisualStudio.Text.PositionAffinity
    If the mapping is ambiguous, this parameter affects the mapping as follows:
    if affinity is Predecessor, the mapping targets the position immediately after the preceding character in the projection buffer
    if affinity is Successor, the mapping targets the position immediately before the following character in the projection buffer.
    This parameter has no effect if the mapping is unambiguous.

Return Value

Type: System.Boolean
true if the point is represented in the visual buffer, otherwise false.

Remarks

A point that is represented in the visual buffer may not be visible on screen, but if the view is scrolled to that position, then the point would become visible.

.NET Framework Security

See Also

Reference

ITextViewModel Interface

Microsoft.VisualStudio.Text.Editor Namespace