ITextView.GetTextElementSpan 方法

在指定 SnapshotPoint 获取构成文本元素(单一可视化表示形式)的文本 SnapshotSpan

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

语法

声明
Function GetTextElementSpan ( _
    point As SnapshotPoint _
) As SnapshotSpan
SnapshotSpan GetTextElementSpan(
    SnapshotPoint point
)
SnapshotSpan GetTextElementSpan(
    SnapshotPoint point
)
abstract GetTextElementSpan : 
        point:SnapshotPoint -> SnapshotSpan
function GetTextElementSpan(
    point : SnapshotPoint
) : SnapshotSpan

参数

返回值

类型:Microsoft.VisualStudio.Text.SnapshotSpan
一个包含文本元素边界的 SnapshotSpan

异常

异常 条件
ArgumentException

point 是从错误的 ITextBuffer

备注

文本元素可以是 UTF-16 代理项对,包含一个高代理项字符和一个低代理项字符。 如果在文本缓冲区的点放在一个高代理项字符和一个低代理项字符之间,文本元素大小将开始在高代理项字符和结束在低代理项字符。

.NET Framework 安全性

请参阅

参考

ITextView 接口

Microsoft.VisualStudio.Text.Editor 命名空间