Selection
Represents a selection information.
Definition
Namespace:Telerik.WinForms.Controls.SyntaxEditor.UI
Assembly:Telerik.WinControls.SyntaxEditor.dll
Syntax:
public class Selection : IDisposable
Inheritance: objectSelection
Implements:
Properties
Gets the active position.
public CaretPosition ActivePosition { get; }
The active position.
Gets the anchored position.
public CaretPosition AnchoredPosition { get; }
The anchored position.
Gets the document.
public TextDocument Document { get; }
The document.
Gets the end position.
public CaretPosition EndPosition { get; }
The end position.
Gets a value indicating whether this instance is empty.
public bool IsEmpty { get; }
true if this instance is empty; otherwise, false.
Gets a value indicating whether this instance is reversed.
public bool IsReversed { get; }
true if this instance is reversed; otherwise, false.
Gets or sets the mode.
public TextSelectionMode Mode { get; set; }
The mode.
SelectedSpans
IEnumerable<Span>
Gets the selected spans.
public IEnumerable<Span> SelectedSpans { get; }
The selected spans.
Gets the start position.
public CaretPosition StartPosition { get; }
The start position.
Methods
Clears this instance.
public void Clear()
Determines whether the specified position contains position.
public bool ContainsPosition(CaretPosition caretPosition, bool inclusive = true)
Creates the state of the selection.
public SelectionState CreateSelectionState(bool anchorPositions)
If set to true [anchor positions].
SelectionState.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements:
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Gets the selected text.
protected virtual void OnPreviewDragDrop(PreviewDragDropEventArgs args)
protected virtual void OnPreviewDragOver(PreviewDragOverEventArgs args)
protected virtual void OnPreviewDragStart(PreviewDragStartEventArgs args)
Called when [selection changed].
protected virtual void OnSelectionChanged()
Called when [selection changing].
protected virtual void OnSelectionChanging()
Restores the state of the selection.
public void RestoreSelectionState(SelectionState selectionState)
State of the selection.
Selects the specified start position.
public void Select(CaretPosition startPosition, CaretPosition endPosition)
Selects the specified span.
Selects all.
public void SelectAll()
Sets the selection end.
public void SetSelectionEnd(CaretPosition endPosition)
The end position.
Sets the selection start.
public void SetSelectionStart(CaretPosition startPosition)
The start position.
Events
Occurs upon releasing the mouse and dropping the selection.
public event EventHandler<PreviewDragDropEventArgs> PreviewDragDrop
Occurs upon moving the selection over the document.
public event EventHandler<PreviewDragOverEventArgs> PreviewDragOver
Occurs when selection dragging is about to be started.
public event EventHandler<PreviewDragStartEventArgs> PreviewDragStart
Occurs when [selection changed].
public event EventHandler SelectionChanged
Occurs when [selection changing].
public event EventHandler SelectionChanging