ITextViewLine.GetBufferPositionFromXCoordinate 方法 (Double)

获取其字符边界包含给定 x 坐标的字符的缓冲区位置。

命名空间:  Microsoft.VisualStudio.Text.Formatting
程序集:  Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)

语法

声明
Function GetBufferPositionFromXCoordinate ( _
    xCoordinate As Double _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
    double xCoordinate
)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
    double xCoordinate
)
abstract GetBufferPositionFromXCoordinate : 
        xCoordinate:float -> Nullable<SnapshotPoint> 
function GetBufferPositionFromXCoordinate(
    xCoordinate : double
) : Nullable<SnapshotPoint>

参数

  • xCoordinate
    类型:Double

    所需字符的 x 坐标。

返回值

类型:Nullable<SnapshotPoint>
; 如果没有字符在该位置,基于文本缓冲区的点字符在 xCoordinate则为 null。

备注

这与 GetBufferPositionFromXCoordinate (xCoordinate等效,错误)。

.NET Framework 安全性

请参阅

参考

ITextViewLine 接口

GetBufferPositionFromXCoordinate 重载

Microsoft.VisualStudio.Text.Formatting 命名空间