Represents a collection of selection ranges in a document.
Definition
Namespace:Telerik.Windows.Documents.Selection
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class SelectionRangeCollection : ICollection<SelectionRange>, IEnumerable<SelectionRange>, IEnumerable
Inheritance: objectSelectionRangeCollection
Implements:
Constructors
public SelectionRangeCollection()
Properties
Gets the number of selection ranges in the collection.
public int Count { get; }
Implements:
Gets the first selection range in the collection.
public SelectionRange First { get; }
Gets a value indicating whether the selection range collection is read-only.
public bool IsReadOnly { get; }
Implements:
Gets the last selection range in the collection.
public SelectionRange Last { get; }
Methods
Adds a new selection range to the collection.
public void Add(SelectionRange item)
The selection range to be added to the collection.
Implements:
Removes all selections from the SelectionRangeCollection.
public void Clear()
Implements:
This method clears the current collection of selected ranges, effectively resetting the selection.
Determines whether the specified selection range is contained within the collection.
public bool Contains(SelectionRange item)
The selection range to check for containment.
Returns:True if the collection contains the specified selection range; otherwise, false.
Implements:
Copies the elements of the current SelectionRangeCollection to a specified array, starting at a particular array index.
public void CopyTo(SelectionRange[] array, int arrayIndex)
The one-dimensional array that is the destination of the elements copied from the SelectionRangeCollection. The array must have zero-based indexing.
arrayIndexintThe zero-based index in the destination array at which storing the copied elements begins.
Implements:
Returns an enumerator that iterates through the selection range collection.
public IEnumerator<SelectionRange> GetEnumerator()
An enumerator that can be used to iterate through the SelectionRangeCollection.
Implements:
Removes a specified selection range from the collection.
public bool Remove(SelectionRange item)
The selection range to be removed from the collection.
Returns:Returns a boolean indicating whether the removal was successful.
Implements:
Sorts the collection of selection ranges in descending order.
public SelectionRangeCollection SortDescending()
A collection of selection ranges sorted in descending order.