TextRangeTrackingMode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the tracking modes for TextRange objects, which determine how spans of text are adjusted when text changes occur.
public enum TextRangeTrackingMode
type TextRangeTrackingMode =
Public Enum TextRangeTrackingMode
Inheritance
Fields
Name
Value
Description
0
The span does not expand when text changes occur at its boundaries.
Leading Edge-Forward tracking, meaning that insertions at the leading edge push the current position towards the end of the span.
Trailing Edge : Backward tracking, meaning that insertions at the trailing edge push the current position towards the start of the span.
┌──────────┐
<strong>Baseline:</strong> Foo│ExtendNone│Bar
└──────────┘
┌─────────┐
<strong>Remove leading:</strong> Foo│xtendNone│Bar
└─────────┘
┌─────────┐
<strong>Remove trailing:</strong> Foo│ExtendNon│Bar
└─────────┘
┌──────────┐
<strong>Insert leading:</strong> FooXXX│ExtendNone│Bar
└──────────┘
┌──────────┐
<strong>Insert trailing:</strong> Foo│ExtendNone│XXXBar
└──────────┘
0
The span does not expand when text changes occur at its boundaries.
Leading Edge-Forward tracking, meaning that insertions at the leading edge push the current position towards the end of the span.
Trailing Edge : Backward tracking, meaning that insertions at the trailing edge push the current position towards the start of the span.
┌──────────┐
<strong>Baseline:</strong> Foo│ExtendNone│Bar
└──────────┘
┌─────────┐
<strong>Remove leading:</strong> Foo│xtendNone│Bar
└─────────┘
┌─────────┐
<strong>Remove trailing:</strong> Foo│ExtendNon│Bar
└─────────┘
┌──────────┐
<strong>Insert leading:</strong> FooXXX│ExtendNone│Bar
└──────────┘
┌──────────┐
<strong>Insert trailing:</strong> Foo│ExtendNone│XXXBar
└──────────┘
1
The span expands when text changes occur at its boundaries.
Leading Edge-Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
Trailing Edge : Forward tracking, meaning that insertions at the trailing edge push the current position towards the end of the span.
┌────────────────────────┐
<strong>Baseline:</strong> Foo│ExtendForwardAndBackward│Bar
└────────────────────────┘
┌───────────────────────┐
<strong>Remove leading:</strong> Foo│xtendForwardAndBackward│Bar
└───────────────────────┘
┌───────────────────────┐
<strong>Remove trailing:</strong> Foo│ExtendForwardAndBackwar│Bar
└───────────────────────┘
┌───────────────────────────┐
<strong>Insert leading:</strong> Foo│XXXExtendForwardAndBackward│Bar
└───────────────────────────┘
┌───────────────────────────┐
<strong>Insert trailing:</strong> Foo│ExtendForwardAndBackwardXXX│Bar
└───────────────────────────┘
ExtendForwardAndBackward
1
The span expands when text changes occur at its boundaries.
Leading Edge-Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
Trailing Edge : Forward tracking, meaning that insertions at the trailing edge push the current position towards the end of the span.
┌────────────────────────┐
<strong>Baseline:</strong> Foo│ExtendForwardAndBackward│Bar
└────────────────────────┘
┌───────────────────────┐
<strong>Remove leading:</strong> Foo│xtendForwardAndBackward│Bar
└───────────────────────┘
┌───────────────────────┐
<strong>Remove trailing:</strong> Foo│ExtendForwardAndBackwar│Bar
└───────────────────────┘
┌───────────────────────────┐
<strong>Insert leading:</strong> Foo│XXXExtendForwardAndBackward│Bar
└───────────────────────────┘
┌───────────────────────────┐
<strong>Insert trailing:</strong> Foo│ExtendForwardAndBackwardXXX│Bar
└───────────────────────────┘
2
Both edges of the span move towards the end when insertions occur.
Leading Edge-Forward tracking, meaning that insertions at the leading edge push the current position towards the end of the span.
Trailing Edge : Forward tracking, meaning that insertions at the trailing edge push the current position towards the end of the span.
┌─────────────┐
<strong>Baseline:</strong> Foo│ExtendForward│Bar
└─────────────┘
┌────────────┐
<strong>Remove leading:</strong> Foo│xtendForward│Bar
└────────────┘
┌────────────┐
<strong>Remove trailing:</strong> Foo│ExtendForwar│Bar
└────────────┘
┌─────────────┐
<strong>Insert leading:</strong> FooXXX│ExtendForward│Bar
└─────────────┘
┌────────────────┐
<strong>Insert trailing:</strong> Foo│ExtendForwardXXX│Bar
└────────────────┘
2
Both edges of the span move towards the end when insertions occur.
Leading Edge-Forward tracking, meaning that insertions at the leading edge push the current position towards the end of the span.
Trailing Edge : Forward tracking, meaning that insertions at the trailing edge push the current position towards the end of the span.
┌─────────────┐
<strong>Baseline:</strong> Foo│ExtendForward│Bar
└─────────────┘
┌────────────┐
<strong>Remove leading:</strong> Foo│xtendForward│Bar
└────────────┘
┌────────────┐
<strong>Remove trailing:</strong> Foo│ExtendForwar│Bar
└────────────┘
┌─────────────┐
<strong>Insert leading:</strong> FooXXX│ExtendForward│Bar
└─────────────┘
┌────────────────┐
<strong>Insert trailing:</strong> Foo│ExtendForwardXXX│Bar
└────────────────┘
3
Both edges of the span move towards the start when insertions occur.
Leading Edge-Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
Trailing Edge : Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
┌──────────────┐
<strong>Baseline:</strong> Foo│ExtendBackward│Bar
└──────────────┘
┌─────────────┐
<strong>Remove leading:</strong> Foo│xtendBackward│Bar
└─────────────┘
┌─────────────┐
<strong>Remove trailing:</strong> Foo│ExtendBackwar│Bar
└─────────────┘
┌─────────────────┐
<strong>Insert leading:</strong> Foo│XXXExtendBackward│Bar
└─────────────────┘
┌──────────────┐
<strong>Insert trailing:</strong> Foo│ExtendBackward│XXXBar
└──────────────┘
3
Both edges of the span move towards the start when insertions occur.
Leading Edge-Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
Trailing Edge : Backward tracking, meaning that insertions at the leading edge push the current position towards the start of the span.
┌──────────────┐
<strong>Baseline:</strong> Foo│ExtendBackward│Bar
└──────────────┘
┌─────────────┐
<strong>Remove leading:</strong> Foo│xtendBackward│Bar
└─────────────┘
┌─────────────┐
<strong>Remove trailing:</strong> Foo│ExtendBackwar│Bar
└─────────────┘
┌─────────────────┐
<strong>Insert leading:</strong> Foo│XXXExtendBackward│Bar
└─────────────────┘
┌──────────────┐
<strong>Insert trailing:</strong> Foo│ExtendBackward│XXXBar
└──────────────┘
4
Custom client-determined tracking behavior.