Class Selection
Represents a selection information.
Inheritance
Namespace: Telerik.Windows.Controls.SyntaxEditor.UI
Assembly: Telerik.Windows.Controls.SyntaxEditor.dll
Syntax
public class Selection : Object, IDisposable
Properties
ActivePosition
Gets the active position.
Declaration
public CaretPosition ActivePosition { get; }
Property Value
Caret The active position. |
AnchoredPosition
Gets the anchored position.
Declaration
public CaretPosition AnchoredPosition { get; }
Property Value
Caret The anchored position. |
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
Text The document. |
EndPosition
Gets the end position.
Declaration
public CaretPosition EndPosition { get; }
Property Value
Caret The end position. |
IsEmpty
Gets a value indicating whether this instance is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.
|
IsReversed
Gets a value indicating whether this instance is reversed.
Declaration
public bool IsReversed { get; }
Property Value
System.
|
Mode
Gets or sets the mode.
Declaration
public TextSelectionMode Mode { get; set; }
Property Value
Text The mode. |
SelectedSpans
Gets the selected spans.
Declaration
public IEnumerable<Span> SelectedSpans { get; }
Property Value
System. The selected spans. |
StartPosition
Gets the start position.
Declaration
public CaretPosition StartPosition { get; }
Property Value
Caret The start position. |
Methods
Clear()
Clears this instance.
Declaration
public void Clear()
ContainsPosition(CaretPosition, Boolean)
Determines whether the specified position contains position.
Declaration
public bool ContainsPosition(CaretPosition caretPosition, bool inclusive = true)
Parameters
Caret
|
System.
|
Returns
System.
|
CreateSelectionState(Boolean)
Creates the state of the selection.
Declaration
public SelectionState CreateSelectionState(bool anchorPositions)
Parameters
System. If set to |
Returns
Selection SelectionState. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.
|
GetSelectedText()
Gets the selected text.
Declaration
public string GetSelectedText()
Returns
System. System.String. |
OnSelectionChanged()
Called when [selection changed].
Declaration
protected virtual void OnSelectionChanged()
OnSelectionChanging()
Called when [selection changing].
Declaration
protected virtual void OnSelectionChanging()
RestoreSelectionState(SelectionState)
Restores the state of the selection.
Declaration
public void RestoreSelectionState(SelectionState selectionState)
Parameters
Selection State of the selection. |
Select(CaretPosition, CaretPosition)
Selects the specified start position.
Declaration
public void Select(CaretPosition startPosition, CaretPosition endPosition)
Parameters
Caret
|
Caret
|
Select(Span)
Selects the specified span.
Declaration
public void Select(Span span)
Parameters
Span
span
The span. |
Select(Span, Boolean)
Selects the specified span.
Declaration
public void Select(Span span, bool isReversed)
Parameters
Span
span
|
System.
|
SelectAll()
Selects all.
Declaration
public void SelectAll()
SetSelectionEnd(CaretPosition)
Sets the selection end.
Declaration
public void SetSelectionEnd(CaretPosition endPosition)
Parameters
Caret The end position. |
SetSelectionStart(CaretPosition)
Sets the selection start.
Declaration
public void SetSelectionStart(CaretPosition startPosition)
Parameters
Caret The start position. |
ToString()
Returns a System.
Declaration
public override string ToString()
Returns
System. A System. |
Events
SelectionChanged
Occurs when [selection changed].
Declaration
public event EventHandler SelectionChanged
Event Type
System.
|
SelectionChanging
Occurs when [selection changing].
Declaration
public event EventHandler SelectionChanging
Event Type
System.
|