Interface IFind
This interface provides functionality for searching the document, for example, a "find and replace" feature.
Namespace: Sdl.DesktopEditor.EditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IFind
Properties
Finished
true if the search has completed.
Declaration
bool Finished { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Match
The range denoting the start and end of the current match.
Declaration
ContentRange Match { get; }
Property Value
Type | Description |
---|---|
ContentRange |
MatchFound
true if a match was found.
Declaration
bool MatchFound { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Properties
The properties that describe the settings used when running the search.
Declaration
IFindProperties Properties { get; }
Property Value
Type | Description |
---|---|
IFindProperties |
Range
The range in the document that the search applies to.
Declaration
ContentRange Range { get; }
Property Value
Type | Description |
---|---|
ContentRange |
Text
The text to search for.
Declaration
string Text { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
NextMatch()
Moves the find operation to the next match and returns true while a match exists.
Declaration
bool NextMatch()
Returns
Type | Description |
---|---|
System.Boolean |
ReplaceRange(ContentRange)
Replace the entire range. This is a heavyweight operation and should only be used if replace operations break the range beyond repair.
Declaration
void ReplaceRange(ContentRange range)
Parameters
Type | Name | Description |
---|---|---|
ContentRange | range | The new range to use. |
UpdateRangeFrom(Position)
Updates the "from" position of the Range property. This should be a valid position in the document.
Declaration
void UpdateRangeFrom(Position from)
Parameters
Type | Name | Description |
---|---|---|
Position | from |
UpdateRangeUpTo(Position)
Updates the "upto" position of the Range property. This should be a valid position in the document.
Declaration
void UpdateRangeUpTo(Position upTo)
Parameters
Type | Name | Description |
---|---|---|
Position | upTo |