获取其字符边界包含给定 x 坐标的字符的缓冲区位置。
命名空间: Microsoft.VisualStudio.Text.Formatting
程序集: Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)
语法
声明
Function GetBufferPositionFromXCoordinate ( _
xCoordinate As Double, _
textOnly As Boolean _
) As Nullable(Of SnapshotPoint)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
double xCoordinate,
bool textOnly
)
Nullable<SnapshotPoint> GetBufferPositionFromXCoordinate(
double xCoordinate,
bool textOnly
)
abstract GetBufferPositionFromXCoordinate :
xCoordinate:float *
textOnly:bool -> Nullable<SnapshotPoint>
function GetBufferPositionFromXCoordinate(
xCoordinate : double,
textOnly : boolean
) : Nullable<SnapshotPoint>
参数
xCoordinate
类型:Double所需字符的 x 坐标。
textOnly
类型:Boolean如果 true,则此方法将返回 nullnull 引用(在 Visual Basic 中为 Nothing) ,如果 xCoordinate 在修饰。
返回值
类型:Nullable<SnapshotPoint>
; 如果没有字符在该位置,基于文本缓冲区的点字符在 xCoordinate或 nullnull 引用(在 Visual Basic 中为 Nothing) 。
备注
字符边界的最右边缘将在其后面的字符包含。 最后一个字符的区域的最右边缘未映射到任何字符。 如果 textOnly 为 true,并且 xCoordinate 在修饰,则文本位置与修饰返回。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。