Skip to content

Commit 5e6d5dd

Browse files
authored
Update FindOnPage.md
changed startfindasync to startasync
1 parent 4257d86 commit 5e6d5dd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

FindOnPage.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ completion, match count changes, and match index changes.
2424

2525
#### Description
2626

27-
To initiate a Find operation in a WebView2 control, use the `StartFindAsync` method.
27+
To initiate a Find operation in a WebView2 control, use the `StartAsync` method.
2828
This method allows setting the Find term and Find parameters via the
2929
`ICoreWebView2FindOptions` interface. Only one Find session can be active per
3030
WebView2 environment. Starting another with the same option will adjust
@@ -157,7 +157,7 @@ async Task ConfigureAndExecuteFindWithDefaultUIAsync(string findTerm)
157157
// you can change the SuppressDefaultDialog and ShouldHighlightAllMatches properties here.
158158
159159
// Start the Find operation with the specified options.
160-
await webView.CoreWebView2.Find.StartFindAsync(find_options);
160+
await webView.CoreWebView2.Find.StartAsync(find_options);
161161
162162
// End user interaction is handled via UI.
163163
}
@@ -191,7 +191,7 @@ async Task ConfigureAndExecuteFindWithCustomUIAsync(string findTerm)
191191
webView.CoreWebView2.Find.ShouldHighlightAllMatches = true;
192192

193193
// Start the Find operation with the specified options.
194-
await webView.CoreWebView2.Find.StartFindAsync(find_options);
194+
await webView.CoreWebView2.Find.StartAsync(find_options);
195195
// It's expected that the custom UI for navigating between matches (next, previous)
196196
// and stopping the Find operation will be managed by the developer's custom code.
197197
}
@@ -574,15 +574,15 @@ runtimeclass CoreWebView2FindOptions : [default]ICoreWebView2FindOptions {}
574574
interface ICoreWebView2Find
575575
{
576576
[completed_handler("")]
577-
/// Initiates a Find using the specified options asynchronously.
577+
/// Initiates a Find session using the specified options asynchronously.
578578
/// Displays the Find bar and starts the Find operation. If a Find session was already ongoing, it will be stopped and replaced with this new instance.
579579
/// If called with an empty string, the Find bar is displayed but no finding occurs. Changing the Find options object after initiation won't affect the ongoing Find session.
580-
/// To change the ongoing Find session, StartFindAsync must be called again with a new or modified Find options object.
581-
/// StartFind supports, HTML, PDF, and TXT document queries. In general this api is designed for text based Find sessions.
582-
//// If you start a Find session programmatically on another file format that doesnt have text fields, the Find session will try to execute but will fail to Find any matches. Specifically, it will show the find UI but not find any matches.
583-
/// Note: The asynchronous action completes when the UI has been displayed with the Find term in the UI bar, and the matches have populated on the counter on the Find bar.
580+
/// To change the ongoing Find session, StartAsync must be called again with a new or modified Find options object.
581+
/// StartAsync supports, HTML, PDF, and TXT document queries. In general this api is designed for text based Find sessions.
582+
//// If you start a Find session programmatically on another file format that doesnt have text fields, the Find session will show the find UI but not find any matches.
583+
/// StartAsync Completion: The asynchronous action completes when the UI has been displayed with the Find term in the UI bar, and the matches have populated on the counter on the Find bar.
584584
/// There may be a slight latency between the UI display and the matches populating in the counter.
585-
/// The MatchCountChanged and ActiveMatchIndexChanged events are only raised after StartFindAsync has completed, otherwise they will have their default values (-1 for both).
585+
/// The MatchCountChanged and ActiveMatchIndexChanged events are only raised after StartAsync has completed, otherwise they will have their default values (-1 for ActiveMatchIndex and 0 for TotalMatchCount).
586586
/// When initiating a Find session while another session is in progress, the behavior of
587587
/// the active match index depends on the direction set for the Find operation (forward or backward).
588588
/// However, calling StartFind again during an ongoing Find operation does not resume from the point
@@ -591,7 +591,7 @@ runtimeclass CoreWebView2FindOptions : [default]ICoreWebView2FindOptions {}
591591
/// regardless of the previous active match. This behavior indicates that changing the Find query initiates a
592592
/// completely new Find session, rather than continuing from the previous match index. This distinction is essential
593593
/// to understand when utilizing the StartFind method for navigating through text matches.
594-
Windows.Foundation.IAsyncAction StartFindAsync(CoreWebView2FindOptions options);
594+
Windows.Foundation.IAsyncAction StartAsync(CoreWebView2FindOptions options);
595595

596596

597597
/// Navigates to the next match in the document.

0 commit comments

Comments
 (0)