TextSelection Class
Encapsulates the selection state for the RichTextBox control.
Assembly: PresentationFramework (in PresentationFramework.dll)
| Name | Description | |
|---|---|---|
![]() | End | Get the position that marks the end of the current selection.(Inherited from TextRange.) |
![]() | IsEmpty | Gets a value indicating whether or not the current selection is empty.(Inherited from TextRange.) |
![]() | Start | Gets the position that marks the beginning of the current selection.(Inherited from TextRange.) |
![]() | Text | Gets or sets the plain text contents of the current selection.(Inherited from TextRange.) |
| Name | Description | |
|---|---|---|
![]() | ApplyPropertyValue(DependencyProperty^, Object^) | Applies a specified formatting property and value to the current selection.(Inherited from TextRange.) |
![]() | CanLoad(String^) | Checks whether the current selection can be loaded with content in a specified data format.(Inherited from TextRange.) |
![]() | CanSave(String^) | Checks whether the current selection can be saved as a specified data format.(Inherited from TextRange.) |
![]() | ClearAllProperties() | |
![]() | Contains(TextPointer^) | Checks whether a position (specified by a TextPointer) is located within the current selection.(Inherited from TextRange.) |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetPropertyValue(DependencyProperty^) | Returns the effective value of a specified formatting property on the current selection.(Inherited from TextRange.) |
![]() | GetType() | |
![]() | Load(Stream^, String^) | Loads the current selection in a specified data format from a specified stream.(Inherited from TextRange.) |
![]() | Save(Stream^, String^) | Saves the current selection to a specified stream in a specified data format.(Inherited from TextRange.) |
![]() | Save(Stream^, String^, Boolean) | Saves the current selection to a specified stream in a specified data format, with the option of preserving custom TextElement objects.(Inherited from TextRange.) |
![]() | Select(TextPointer^, TextPointer^) | Updates the current selection, taking two TextPointer positions to indicate the updated selection.(Inherited from TextRange.) |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
This type has no public constructor, but is exposed via a public property defined by RichTextBox.
Available since 3.0
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


