ClassSelection
Represents a selection information.
Definition
Namespace:Telerik.Windows.Controls.SyntaxEditor.UI
Assembly:Telerik.Windows.Controls.SyntaxEditor.dll
Syntax:
public class Selection : IDisposable
Inheritance: objectSelection
Implements:
Properties
ActivePosition
Gets the active position.
Declaration
public CaretPosition ActivePosition { get; }
Property Value
The active position.
AnchoredPosition
Gets the anchored position.
Declaration
public CaretPosition AnchoredPosition { get; }
Property Value
The anchored position.
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
The document.
EndPosition
Gets the end position.
Declaration
public CaretPosition EndPosition { get; }
Property Value
The end position.
IsEmpty
Gets a value indicating whether this instance is empty.
Declaration
public bool IsEmpty { get; }
Property Value
true if this instance is empty; otherwise, false.
IsReversed
Gets a value indicating whether this instance is reversed.
Declaration
public bool IsReversed { get; }
Property Value
true if this instance is reversed; otherwise, false.
Mode
Gets or sets the mode.
Declaration
public TextSelectionMode Mode { get; set; }
Property Value
The mode.
SelectedSpans
Gets the selected spans.
Declaration
public IEnumerable<Span> SelectedSpans { get; }
Property Value
The selected spans.
StartPosition
Gets the start position.
Declaration
public CaretPosition StartPosition { get; }
Property Value
The start position.
Methods
ContainsPosition(CaretPosition, bool)
Determines whether the specified position contains position.
Declaration
public bool ContainsPosition(CaretPosition caretPosition, bool inclusive = true)
Parameters
caretPosition
inclusive
Returns
CreateSelectionState(bool)
Creates the state of the selection.
Declaration
public SelectionState CreateSelectionState(bool anchorPositions)
Parameters
anchorPositions
If set to true [anchor positions].
Returns
SelectionState.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
GetSelectedText()
Gets the selected text.
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
State of the selection.
Select(CaretPosition, CaretPosition)
Selects the specified start position.
Declaration
public void Select(CaretPosition startPosition, CaretPosition endPosition)
Parameters
startPosition
endPosition
Select(Span)
Selects the specified span.
Select(Span, bool)
Selects the specified span.
SetSelectionEnd(CaretPosition)
Sets the selection end.
Declaration
public void SetSelectionEnd(CaretPosition endPosition)
Parameters
endPosition
The end position.
SetSelectionStart(CaretPosition)
Sets the selection start.
Declaration
public void SetSelectionStart(CaretPosition startPosition)
Parameters
startPosition
The start position.
ToString()
Returns a string that represents this instance.
Events
SelectionChanged
Occurs when [selection changed].
SelectionChanging
Occurs when [selection changing].