获取 VisualBuffer 中的一个点,该点与编辑缓冲区中的指定点相对应。 如果该点是隐藏的或具有其他表示形式,则获取离该点最近的点。
命名空间: Microsoft.VisualStudio.Text.Editor
程序集: Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)
语法
声明
Function GetNearestPointInVisualSnapshot ( _
editBufferPoint As SnapshotPoint, _
targetVisualSnapshot As ITextSnapshot, _
trackingMode As PointTrackingMode _
) As SnapshotPoint
SnapshotPoint GetNearestPointInVisualSnapshot(
SnapshotPoint editBufferPoint,
ITextSnapshot targetVisualSnapshot,
PointTrackingMode trackingMode
)
SnapshotPoint GetNearestPointInVisualSnapshot(
SnapshotPoint editBufferPoint,
ITextSnapshot^ targetVisualSnapshot,
PointTrackingMode trackingMode
)
abstract GetNearestPointInVisualSnapshot :
editBufferPoint:SnapshotPoint *
targetVisualSnapshot:ITextSnapshot *
trackingMode:PointTrackingMode -> SnapshotPoint
function GetNearestPointInVisualSnapshot(
editBufferPoint : SnapshotPoint,
targetVisualSnapshot : ITextSnapshot,
trackingMode : PointTrackingMode
) : SnapshotPoint
参数
editBufferPoint
类型:Microsoft.VisualStudio.Text.SnapshotPointEditBuffer 中的一个点。
targetVisualSnapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot要映射到的 VisualBuffer 的快照。
trackingMode
类型:Microsoft.VisualStudio.Text.PointTrackingMode使用的 PointTrackingMode ,在转换为 targetVisualSnapshot时。
返回值
类型:Microsoft.VisualStudio.Text.SnapshotPoint
VisualBuffer 中与 targetVisualSnapshot 中的给定点相对应的点。
备注
定义 “最靠近”取决于文本视图模型的实现。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。