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
CaretPosition
The active position. |
AnchoredPosition
Gets the anchored position.
Declaration
public CaretPosition AnchoredPosition { get; }
Property Value
CaretPosition
The anchored position. |
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
TextDocument
The document. |
EndPosition
Gets the end position.
Declaration
public CaretPosition EndPosition { get; }
Property Value
CaretPosition
The end position. |
IsEmpty
Gets a value indicating whether this instance is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
|
IsReversed
Gets a value indicating whether this instance is reversed.
Declaration
public bool IsReversed { get; }
Property Value
System.Boolean
|
Mode
Gets or sets the mode.
Declaration
public TextSelectionMode Mode { get; set; }
Property Value
TextSelectionMode
The mode. |
SelectedSpans
Gets the selected spans.
Declaration
public IEnumerable<Span> SelectedSpans { get; }
Property Value
System.Collections.Generic.IEnumerable<Span>
The selected spans. |
StartPosition
Gets the start position.
Declaration
public CaretPosition StartPosition { get; }
Property Value
CaretPosition
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
CaretPosition
caretPosition
|
System.Boolean
inclusive
|
Returns
System.Boolean
|
CreateSelectionState(Boolean)
Creates the state of the selection.
Declaration
public SelectionState CreateSelectionState(bool anchorPositions)
Parameters
System.Boolean
anchorPositions
If set to |
Returns
SelectionState
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.Boolean
disposing
|
GetSelectedText()
Gets the selected text.
Declaration
public string GetSelectedText()
Returns
System.String
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
SelectionState
selectionState
State of the selection. |
Select(CaretPosition, CaretPosition)
Selects the specified start position.
Declaration
public void Select(CaretPosition startPosition, CaretPosition endPosition)
Parameters
CaretPosition
startPosition
|
CaretPosition
endPosition
|
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.Boolean
isReversed
|
SelectAll()
Selects all.
Declaration
public void SelectAll()
SetSelectionEnd(CaretPosition)
Sets the selection end.
Declaration
public void SetSelectionEnd(CaretPosition endPosition)
Parameters
CaretPosition
endPosition
The end position. |
SetSelectionStart(CaretPosition)
Sets the selection start.
Declaration
public void SetSelectionStart(CaretPosition startPosition)
Parameters
CaretPosition
startPosition
The start position. |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents this instance. |
Events
SelectionChanged
Occurs when [selection changed].
Declaration
public event EventHandler SelectionChanged
Event Type
System.EventHandler
|
SelectionChanging
Occurs when [selection changing].
Declaration
public event EventHandler SelectionChanging
Event Type
System.EventHandler
|