Uredi

Deli z drugimi prek


TextSelection Class

Definition

Encapsulates the selection state for the RichTextBox control.

public ref class TextSelection sealed : System::Windows::Documents::TextRange
public sealed class TextSelection : System.Windows.Documents.TextRange
type TextSelection = class
    inherit TextRange
Public NotInheritable Class TextSelection
Inherits TextRange
Inheritance
TextSelection

Remarks

This type has no public constructor, but is exposed via a public property defined by RichTextBox.

Properties

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)

Methods

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()

Removes all formatting properties (represented by Inline elements) from the current selection.

(Inherited from TextRange)
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()

Gets the Type of the current instance.

(Inherited from Object)
Load(Stream, String)

Loads the current selection in a specified data format from a specified stream.

(Inherited from TextRange)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
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)
Save(Stream, String)

Saves the current selection to a specified stream in a specified data format.

(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)

Events

Changed

Occurs when the range is repositioned to cover a new span of content.

(Inherited from TextRange)

Applies to