Dela via


IEditorSelection Interface

Applies to v2.

Defines the caret, selection, and text insertion in an editor typically available through the ServiceProvider on the IEditorText interface.

Namespace:  Microsoft.WebMatrix.Extensibility.Editor
Assembly:  Microsoft.WebMatrix.Extensibility (in Microsoft.WebMatrix.Extensibility.dll)

Syntax

'Declaration
Public Interface IEditorSelection _
    Inherits IEditorText
'Usage
Dim instance As IEditorSelection
public interface IEditorSelection : IEditorText
public interface class IEditorSelection : IEditorText
type IEditorSelection =  
    interface 
        interface IEditorText 
    end
public interface IEditorSelection extends IEditorText

The IEditorSelection type exposes the following members.

Properties

  Name Description
Public property CaretPosition Gets the Buffer position.
Public property CurrentColumn Gets the currently selected column.
Public property CurrentLine Gets the current line number for the cursor position in the editor.
Public property EndSelectionPosition Gets the buffer position for end of selection.
Public property IsBlockSelection Gets whether the selection is a block selection.
Public property LineCount Gets the total number of lines in the selection.
Public property ReadOnly Gets a value that indicates whether the current text is read-only. (Inherited from IEditorText.)
Public property SelectedText Gets the text in the selection.
Public property StartSelectionPosition Gets the buffer position for start of selection.
Public property Text Gets or sets all the text in the editor. Setting the text will clear the dirty state. (Inherited from IEditorText.)

Top

Methods

  Name Description
Public method GoTo Creates a selection from a staring offset to the number of characters to select.
Public method InsertText Inserts text into the current editor if it is still open, and haven't been disposed.
Public method SelectAll Selects all the contents of the editor.

Top

See Also

Reference

Microsoft.WebMatrix.Extensibility.Editor Namespace