Dela via


TextRange Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Represents a range of contiguous characters that start from a character offset and run for a specified length.

Namespace:  Microsoft.Windows.Design.SourceUpdate
Assembly:  Microsoft.Windows.Design.Markup (in Microsoft.Windows.Design.Markup.dll)

Syntax

'Declaration
Public NotInheritable Class TextRange _
    Implements IComparable(Of TextRange)
'Usage
Dim instance As TextRange
public sealed class TextRange : IComparable<TextRange>
public ref class TextRange sealed : IComparable<TextRange^>
public final class TextRange implements IComparable<TextRange>

Remarks

The TextRange instance is associated with a TextRangeManager that will keep the text range referring to the same characters across changes to the underlying source document.

TextRange objects cannot be created directly. They are created by a TextRangeManager by calling its GetTextRange method.

If the length of a TextRange is 0, it means it no longer refers to text in the source document. This can occur if the characters the text range was referring to were deleted from the source document.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.SourceUpdate.TextRange

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

TextRange Members

Microsoft.Windows.Design.SourceUpdate Namespace

Other Resources

WPF Designer Extensibility