TextRangeTrackingModes Enum
Specifies how a text range is updated by text change operations that occur at its edges.
[Flags]
public enum TextRangeTrackingModes
Remarks
Combine various flags to achieve different tracking behavior.
Fields
Name | Description |
---|---|
Default | The text range doesn't get deleted by deletion operations that cross it, instead is slides to the deletion start. The text range doesn't expand when insertion operations occur at its edges.
If the text range is
If the text range is |
DeleteMask | The mask value for all delete-related values. |
DeleteWhenSurrounded | Alters deletion behavior such that the text range is deleted if a deletion operation occurs that completely surrounds it. A deletion operation that collapses the text range to zero-length will not delete it. |
DeleteWhenZeroLength | Alters deletion behavior such that the text range is deleted if a deletion operation occurs that surrounds it or collapses it to zero-length.
This value includes the |
ExpandBothEdges | Alters expansion behavior such that the text range expands when insertion operations occur at either of its edges.
If the text range is
If the text range is
This value is the combination of the |
ExpandFirstEdge | Alters expansion behavior such that the text range expands when insertion operations occur at its leading (first) edge.
If the text range is
If the text range is |
ExpandLastEdge | Alters expansion behavior such that the text range expands when insertion operations occur at its trailing (last) edge.
If the text range is
If the text range is |
ExpandMask | The mask value for all expansion-related values. |
LineBased | The text range follows the text on the line to which it is attached. This option is useful for line-based tracking, such as for bookmarks. Inserting a line terminator in the line will move the text range to the next line, unless the line terminator is inserted at the very end of the line. |
NegativeWhenZeroLength | When an insertion occurs at a zero-length text range's offset without expansion options set, the text range will not expand and will not slide in a positive (towards document end) direction. |