表示 ITextView 中的选定文本。
命名空间: Microsoft.VisualStudio.Text.Editor
程序集: Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)
语法
声明
Public Interface ITextSelection
public interface ITextSelection
public interface class ITextSelection
type ITextSelection = interface end
public interface ITextSelection
ITextSelection 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
![]() |
ActivationTracksFocus | 确定 IsActive 是否应跟踪 ITextView 时获取和失去复合焦点。默认值为 true。 |
![]() |
ActivePoint | 获取选定内容的活动点。 |
![]() |
AnchorPoint | 获取选定内容的定位点。 |
![]() |
End | 获取选定内容的终点。 |
![]() |
IsActive | 选定内容是否处于活动状态。 |
![]() |
IsEmpty | 确定选定内容是否为零。 |
![]() |
IsReversed | 确定活动点是否 Span.Start,并且定位点是 Span.End。 |
![]() |
Mode | 获取或设置选择模式。 |
![]() |
SelectedSpans | 当前选定的范围。 |
![]() |
Start | 获取选定内容的起点。 |
![]() |
StreamSelectionSpan | 将当前选定内容当作流选定项获取,而不考虑其模式。 |
![]() |
TextView | 获取此选定内容所属的文本视图。 |
![]() |
VirtualSelectedSpans | VirtualSnapshotSpan 对象形式的当前选定范围。 |
页首
方法
名称 | 说明 | |
---|---|---|
![]() |
Clear | 进行选择零,即起始位置和结束位置在当前选择的逻辑末尾。 |
![]() |
GetSelectionOnTextViewLine | 获取在指定的 ITextViewLine的选择。 |
![]() |
Select(SnapshotSpan, Boolean) | 选择指定的选择范围的文本。 |
![]() |
Select(VirtualSnapshotPoint, VirtualSnapshotPoint) | 选择两个 VirtualSnapshotPoint 对象之间的文本。 |
页首
事件
名称 | 说明 | |
---|---|---|
![]() |
SelectionChanged | 出现问题,则选中或清除调用,以及,如果选定内容为空,并插入符号移动。事件发送方的是此 ITextSelection。 |
页首