@@ -163,7 +163,7 @@ async Task ConfigureAndExecuteFindWithDefaultUIAsync(string findTerm)
163163 // you can change the SuppressDefaultDialog and ShouldHighlightAllMatches properties here.
164164
165165 // Start the find operation with the specified configuration.
166- await webView.CoreWebView2.FindController .StartFindAsync(findConfiguration);
166+ await webView.CoreWebView2.Find .StartFindAsync(findConfiguration);
167167
168168 // End user interaction is handled via UI.
169169 }
@@ -198,11 +198,11 @@ async Task ConfigureAndExecuteFindWithCustomUIAsync(string findTerm)
198198 };
199199
200200 // Specify that a custom UI will be used for the find operation.
201- webView .CoreWebView2 .FindController .SuppressDefaultDialog = true ;
202- webView .CoreWebView2 .FindController .ShouldHighlightAllMatches = true ;
201+ webView .CoreWebView2 .Find .SuppressDefaultDialog = true ;
202+ webView .CoreWebView2 .Find .ShouldHighlightAllMatches = true ;
203203
204204 // Start the find operation with the specified configuration.
205- await webView .CoreWebView2 .FindController .StartFindAsync (findConfiguration );
205+ await webView .CoreWebView2 .Find .StartFindAsync (findConfiguration );
206206 // It's expected that the custom UI for navigating between matches (next, previous)
207207 // and stopping the find operation will be managed by the developer's custom code.
208208 }
@@ -259,17 +259,17 @@ within a WebView2 control using the `GetActiveMatchIndex` method.
259259//! [GetActiveMatchIndex]
260260public async Task<int> GetActiveMatchIndexAsync()
261261{
262- var webViewFind = webView.CoreWebView2.FindController ; // Assuming webView is your WebView2 control
262+ var webViewFind = webView.CoreWebView2.Find ; // Assuming webView is your WebView2 control
263263 var activeMatchIndex = webViewFind.ActiveMatchIndex();
264264 MessageBox.Show($"Active Match Index: {activeMatchIndex}", "Find Operation", MessageBoxButton.OK);
265265 return activeMatchIndex;
266266}
267267
268268void ActiveMatchIndexChangedSample()
269269{
270- webView.CoreWebView2.FindController .ActiveMatchIndexChanged += (object sender, EventArgs args) =>
270+ webView.CoreWebView2.Find .ActiveMatchIndexChanged += (object sender, EventArgs args) =>
271271 {
272- int activeMatchIndex = webView.CoreWebView2.FindController .ActiveMatchIndex;
272+ int activeMatchIndex = webView.CoreWebView2.Find .ActiveMatchIndex;
273273 // Update Custom UI based on the new active match index.
274274 };
275275}
0 commit comments