IEditorSelection 接口

适用于版本2

定义编辑器中的插入点、所选内容和文本插入内容(通常通过 IEditorText 接口上的 ServiceProvider 提供)。

命名空间:  Microsoft.WebMatrix.Extensibility.Editor
程序集:  Microsoft.WebMatrix.Extensibility(在 Microsoft.WebMatrix.Extensibility.dll 中)

语法

声明
Public Interface IEditorSelection _
    Inherits IEditorText
用法
Dim instance As IEditorSelection
public interface IEditorSelection : IEditorText
public interface class IEditorSelection : IEditorText
type IEditorSelection =  
    interface 
        interface IEditorText 
    end
public interface IEditorSelection extends IEditorText

IEditorSelection 类型公开以下成员。

属性

  名称 说明
公共属性 CaretPosition 获取缓冲区位置。
公共属性 CurrentColumn 获取当前所选列。
公共属性 CurrentLine 获取编辑器中的光标位置所在当前行号。
公共属性 EndSelectionPosition 获取所选内容末尾所对应的缓冲区位置。
公共属性 IsBlockSelection 获取选择是否为块选择。
公共属性 LineCount 获取所选内容中的总行数。
公共属性 ReadOnly 获取一个值,该值指示当前文本是否为只读。 (从 IEditorText 继承。)
公共属性 SelectedText 获取所选内容中的文本。
公共属性 StartSelectionPosition 获取所选内容开头所对应的缓冲区位置。
公共属性 Text 获取或设置编辑器中的所有文本。设置文本时将清除脏状态。 (从 IEditorText 继承。)

页首

方法

  名称 说明
公共方法 GoTo 从起始偏移量到要选择的字符数创建一个选择区域。
公共方法 InsertText 将文本插入到当前编辑器中(如果该编辑器仍处于打开状态,并且还没有被释放)。
公共方法 SelectAll 选择编辑器中的所有内容。

页首

请参阅

参考

Microsoft.WebMatrix.Extensibility.Editor 命名空间