Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextPointer.DeleteTextInRun Method (Int32)

 

Deletes the specified number of characters from the position indicated by the current TextPointer.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public int DeleteTextInRun(
	int count
)

Parameters

count
Type: System.Int32

The number of characters to delete, starting at the current position. Specify a positive value to delete characters that follow the current position; specify a negative value to delete characters that precede the current position.

Return Value

Type: System.Int32

The number of characters actually deleted.

Exception Condition
InvalidOperationException

The method is called at a position where text is not allowed.

Specify a positive value to delete characters that follow the current position (as in LogicalDirection.Forward); specify a negative value to delete characters that precede the current position (as in LogicalDirection.Backward).

The number of characters actually deleted may be less than the number specified by count. This happens in cases where count specifies more characters than exist to be deleted.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft