The TextSelection type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| TextSelection |
Initializes a new instance of the TextSelection class.
|
Methods
| Name | Description | |
|---|---|---|
| Clone |
Creates a copy of the current TextRange object.
(Inherited from TextRange.) | |
| Contains |
Checks whether a position (specified by a TextPointer) is located within the current range.
(Inherited from TextRange.) | |
| ContainsPage |
Checks whether specified page is located within the current range.
(Inherited from TextRange.) | |
| Equals | (Inherited from TextRange.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from TextRange.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Select(TextRange) |
Updates the current selection to match the specified text range.
| |
| Select(TextPointer, TextPointer) |
Updates the current selection, taking two TextPointer positions to indicate the updated selection.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| Unselect |
Clears the selection.
|
Properties
| Name | Description | |
|---|---|---|
| Background |
Gets or sets the brush used to fill the background of the selected text.
| |
| End |
Get the position that marks the end of the text range.
(Inherited from TextRange.) | |
| Foreground |
Gets or sets the brush used to fill the foreground of the selected text.
| |
| IsEmpty |
Gets a value indicating whether the text range is empty.
(Inherited from TextRange.) | |
| IsEnabled |
Gets or sets a value indicating whether text selection is enabled.
| |
| Max |
Gets the larger of the start and end point.
(Inherited from TextRange.) | |
| Min |
Gets the smaller of the start and end point.
(Inherited from TextRange.) | |
| Start |
Gets the position that marks the beginning of the text range.
(Inherited from TextRange.) | |
| Text |
Gets the plain text contents of the current selection.
| |
| TextContainer |
Gets or sets the text container for this selection instance.
|
Events
| Name | Description | |
|---|---|---|
| PropertyChanged |
Occurs when a property value changes.
|