ITextVersion Interface
Provides the base requirements for a version of an ITextDocument.
public interface ITextVersion
Properties
Document
Gets the ITextDocument for which this version applies.
ITextDocument Document { get; }
Property Value
- ITextDocument:
The ITextDocument for which this version applies.
Length
Gets the number of characters in the version, excluding any carriage-returns but including newlines.
int Length { get; }
Property Value
- Int32:
The number of characters in the version, excluding any carriage-returns but including newlines.
Next
Gets the next ITextVersion that occurs after this one.
ITextVersion Next { get; }
Property Value
- ITextVersion:
The next ITextVersion that occurs after this one.
Number
Gets the integer version number associated with this instance.
Operations
Gets the read-only list of ITextChangeRangedOperation objects that can be applied to this text version to generate the next version.
IList<ITextChangeRangedOperation> Operations { get; }
Property Value
- IList<ITextChangeRangedOperation>:
The read-only list of ITextChangeRangedOperation objects that can be applied to this text version to generate the next version.
Remarks
This property returns null for the most current version of a document.
Methods
CreateRange(TextRange)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange)
Parameter | Type | Description |
---|---|---|
textRange | TextRange | A TextRange indicating the range of text within this version. |
Returns
- ITextVersionRange:
An ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
CreateRange(TextRange, TextRangeTrackingModes)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange, TextRangeTrackingModes trackingModes)
Parameter | Type | Description |
---|---|---|
textRange | TextRange | A TextRange indicating the range of text within this version. |
trackingModes | TextRangeTrackingModes | A TextRangeTrackingModes indicating the tracking modes to use. |
Returns
- ITextVersionRange:
An ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
CreateRange(TextRange, Func<TextRangeTrackingModes>)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(TextRange textRange, Func<TextRangeTrackingModes> trackingModesFunc)
Parameter | Type | Description |
---|---|---|
textRange | TextRange | A TextRange indicating the range of text within this version. |
trackingModesFunc | Func<TextRangeTrackingModes> | A function that dynamically returns a TextRangeTrackingModes indicating the tracking modes to use. |
Returns
- ITextVersionRange:
An ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
CreateRange(Int32, Int32)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(int startOffset, int length)
Parameter | Type | Description |
---|---|---|
startOffset | Int32 | The start offset in the range. |
length | Int32 | The length of the range. |
Returns
- ITextVersionRange:
An ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
CreateRange(Int32, Int32, TextRangeTrackingModes)
Creates an ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.
ITextVersionRange CreateRange(int startOffset, int length, TextRangeTrackingModes trackingModes)
Parameter | Type | Description |
---|---|---|
startOffset | Int32 | The start offset in the range. |
length | Int32 | The length of the range. |
trackingModes | TextRangeTrackingModes | A TextRangeTrackingModes indicating the tracking modes to use. |
Returns
- ITextVersionRange:
An ITextVersionRange that stores data about a text range in this version and can be used to translate to other versions.