An enumeration for choosing the start position of a DocumentViewerText.Find operation.
lt.Documents.UI.DocumentViewerFindTextStart = {
BeginPosition: 0,
InSelection: 1,
AfterSelection: 2,
ManualPosition: 3
}
lt.Documents.UI.DocumentViewerFindTextStart = {
BeginPosition: 0,
InSelection: 1,
AfterSelection: 2,
ManualPosition: 3
}
Members
0 | BeginPosition | Default. Indicates that the search should run from the provided DocumentViewerFindText.BeginPosition to the DocumentViewerFindText.EndPosition (or top of page 1 and bottom of the last page, if these values were null). This results in one total search from begin to end. |
1 | InSelection | Setting this value to DocumentViewerFindText.Start indicates that the search should begin at the first character inside the first text selection in the document. This position may be either DocumentViewerText.SelectedTextBegin or DocumentViewerText.SelectedTextEnd, depending on the direction of the search.
If no text is selected, DocumentViewerFindText.Start works like If the text selection is within the bounds created by DocumentViewerFindText.BeginPosition and DocumentViewerFindText.EndPosition, this may result in two searches. The first search will occur from the first character in the selection to the position indicated by DocumentViewerFindText.EndPosition. If the first character in the selection is before the If DocumentViewerFindText.Loop or DocumentViewerFindText.FindAll is set to true, then a second search may be conducted from the This behavior is similar to that in |
2 | AfterSelection | Setting this value to DocumentViewerFindText.Start indicates that the search should begin at the first character after the last text selection in the document. This position may be one character before or after DocumentViewerText.SelectedTextBegin or DocumentViewerText.SelectedTextEnd, depending on the direction of the search. If the search is forward / down the page, the start will be the character after DocumentViewerText.SelectedTextEnd; if the search is backward / up the page, the start will be the character before DocumentViewerText.SelectedTextBegin.
If no text is selected, DocumentViewerFindText.Start works like If the text selection is within the bounds created by DocumentViewerFindText.BeginPosition and DocumentViewerFindText.EndPosition, this may result in two searches. The first search will occur from the start point mentioned above to the position indicated by DocumentViewerFindText.EndPosition. If the start position is before the If DocumentViewerFindText.Loop or DocumentViewerFindText.FindAll is set to true, then a second search may be conducted from the This behavior is similar to that in |
3 | ManualPosition | Indicates that the search should start from DocumentViewerFindText.ManualStartPosition.
If this value is provided to DocumentViewerFindText.Start, the search operation will use the value of DocumentViewerFindText.ManualStartPosition as the start point. If DocumentViewerFindText.ManualStartPosition is null, the search will act as if DocumentViewerFindText.BeginPosition was passed to DocumentViewerFindText.Start instead. See DocumentViewerFindText.ManualStartPosition for more information. |
DocumentViewerFindTextStart is an enum type that chooses where the DocumentViewerText.Find method will start its search within the provided begin and end parameters. While the DocumentViewerFindText.BeginPosition and DocumentViewerFindText.EndPosition properties specify the bounds of the search, it is the DocumentViewerFindText.Start that determines where the algorithm will begin searching.
If DocumentViewerFindText.Loop or DocumentViewerFindText.FindAll is true, then the text search operation will be cut into two parts – one search from the start to the endPosition
, and another from the beginPosition
to the character before the start.
History
For an example, see DocumentViewerText.Find.