Skip to content

Commit e5cde96

Browse files
authored
Changed search to find
1 parent 374292a commit e5cde96

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

FindOnPage.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The WebView2Find API offers methods and events for text finding and navigation
66
within a WebView2 control. It enables developers to programmatically initiate find
77
operations, navigate find results, suppress default UI, and customize find configurations
8-
like query and search direction. It also tracks the status of operations, indicating
8+
like query and find direction. It also tracks the status of operations, indicating
99
completion, match count changes, and match index changes.
1010

1111
## Examples
@@ -14,7 +14,7 @@ completion, match count changes, and match index changes.
1414
#### Description
1515

1616
To initiate a find operation in a WebView2 control, use the `StartFind` method.
17-
This method allows setting the search term and find parameters via the
17+
This method allows setting the find term and find parameters via the
1818
`ICoreWebView2FindConfiguration` interface. Only one find session can be active per
1919
webview environment. Starting another with the same configuration will adjust
2020
the active match index based on the selected Find Direction.
@@ -24,7 +24,7 @@ the active match index based on the selected Find Direction.
2424
```cpp
2525

2626
//! [InitializeFindConfiguration]
27-
wil::com_ptr<ICoreWebView2FindConfiguration> AppWindow::InitializeFindConfiguration(const std::wstring& searchTerm)
27+
wil::com_ptr<ICoreWebView2FindConfiguration> AppWindow::InitializeFindConfiguration(const std::wstring& findTerm)
2828
{
2929
// Query for the ICoreWebView2Environment5 interface.
3030
auto webView2Environment5 = m_webViewEnvironment.try_query<ICoreWebView2Environment5>();
@@ -33,7 +33,7 @@ wil::com_ptr<ICoreWebView2FindConfiguration> AppWindow::InitializeFindConfigurat
3333
// Initialize find configuration/settings
3434
wil::com_ptr<ICoreWebView2FindConfiguration> findConfiguration;
3535
CHECK_FAILURE(webView2Environment5->CreateFindConfiguration(&findConfiguration));
36-
CHECK_FAILURE(findConfiguration->put_FindTerm(searchTerm.c_str()));
36+
CHECK_FAILURE(findConfiguration->put_FindTerm(findTerm.c_str()));
3737
CHECK_FAILURE(findConfiguration->put_IsCaseSensitive(false));
3838
CHECK_FAILURE(findConfiguration->put_ShouldMatchWord(false));
3939
CHECK_FAILURE(findConfiguration->put_FindDirection(COREWEBVIEW2_FIND_DIRECTION_FORWARD));
@@ -49,9 +49,9 @@ wil::com_ptr<ICoreWebView2FindConfiguration> AppWindow::InitializeFindConfigurat
4949
5050
```cpp
5151
//! [ExecuteFindWithDefaultUI]
52-
bool AppWindow::ConfigureAndExecuteFind(const std::wstring& searchTerm)
52+
bool AppWindow::ConfigureAndExecuteFind(const std::wstring& findTerm)
5353
{
54-
auto findConfiguration = InitializeFindConfiguration(searchTerm);
54+
auto findConfiguration = InitializeFindConfiguration(findTerm);
5555
if (!findConfiguration)
5656
{
5757
return false;
@@ -93,9 +93,9 @@ bool AppWindow::ConfigureAndExecuteFind(const std::wstring& searchTerm)
9393

9494
```cpp
9595
//! [ExecuteFindWithCustomUI]
96-
bool AppWindow::ExecuteFindWithCustomUI(const std::wstring& searchTerm)
96+
bool AppWindow::ExecuteFindWithCustomUI(const std::wstring& findTerm)
9797
{
98-
auto findConfiguration = InitializeFindConfiguration(searchTerm);
98+
auto findConfiguration = InitializeFindConfiguration(findTerm);
9999
if (!findConfiguration)
100100
{
101101
return false;
@@ -124,7 +124,7 @@ bool AppWindow::ExecuteFindWithCustomUI(const std::wstring& searchTerm)
124124
}
125125
else
126126
{
127-
// Handle errors or unsuccessful search.
127+
// Handle errors or unsuccessful find.
128128
}
129129
return S_OK;
130130
}).Get()));
@@ -142,7 +142,7 @@ bool AppWindow::ExecuteFindWithCustomUI(const std::wstring& searchTerm)
142142
#### .NET C#
143143
```csharp
144144
//! [ConfigureAndExecuteFindWithDefaultUI]
145-
async Task ConfigureAndExecuteFindWithDefaultUIAsync(string searchTerm)
145+
async Task ConfigureAndExecuteFindWithDefaultUIAsync(string findTerm)
146146
{
147147
try
148148
{
@@ -155,7 +155,7 @@ async Task ConfigureAndExecuteFindWithDefaultUIAsync(string searchTerm)
155155
// Initialize the find configuration with specified settings.
156156
var findConfiguration = new CoreWebView2FindConfiguration
157157
{
158-
FindTerm = searchTerm,
158+
FindTerm = findTerm,
159159
IsCaseSensitive = false,
160160
ShouldMatchWord = false,
161161
FindDirection = CoreWebView2FindDirection.Forward
@@ -181,7 +181,7 @@ async Task ConfigureAndExecuteFindWithDefaultUIAsync(string searchTerm)
181181

182182
```csharp
183183
//! [ConfigureAndExecuteFindWithCustomUI]
184-
async Task ConfigureAndExecuteFindWithCustomUIAsync(string searchTerm)
184+
async Task ConfigureAndExecuteFindWithCustomUIAsync(string findTerm)
185185
{
186186
try
187187
{
@@ -194,7 +194,7 @@ async Task ConfigureAndExecuteFindWithCustomUIAsync(string searchTerm)
194194
// Initialize the find configuration with specified settings.
195195
var findConfiguration = new CoreWebView2FindConfiguration
196196
{
197-
FindTerm = searchTerm,
197+
FindTerm = findTerm,
198198
IsCaseSensitive = false,
199199
ShouldMatchWord = false,
200200
FindDirection = CoreWebView2FindDirection.Forward
@@ -282,13 +282,13 @@ void ActiveMatchIndexChangedSample()
282282
## API Details
283283
```cpp
284284

285-
/// Specifies the direction of Search Parameters.
285+
/// Specifies the direction of find Parameters.
286286
// MSOWNERS: core ([email protected])
287287
[v1_enum]
288288
typedef enum COREWEBVIEW2_FIND_DIRECTION {
289-
/// Specifies a forward search in the document.
289+
/// Specifies a forward find in the document.
290290
COREWEBVIEW2_FIND_DIRECTION_FORWARD,
291-
/// Specifies a backwards search in the document.
291+
/// Specifies a backwards find in the document.
292292
COREWEBVIEW2_FIND_DIRECTION_BACKWARD,
293293
} COREWEBVIEW2_FIND_DIRECTION;
294294

@@ -299,7 +299,7 @@ typedef enum COREWEBVIEW2_FIND_DIRECTION {
299299
[uuid(f10bddd3-bb59-5d5b-8748-8a1a53f65d0c), object, pointer_default(unique)]
300300
interface ICoreWebView2StagingEnvironment5 : IUnknown {
301301
/// Creates a new instance of a FindConfiguration object.
302-
/// This configuration object can be used to define parameters for a search operation.
302+
/// This configuration object can be used to define parameters for a find operation.
303303
/// Returns the newly created FindConfiguration object.
304304
// MSOWNERS: core ([email protected])
305305
HRESULT CreateFindConfiguration(
@@ -429,7 +429,7 @@ interface ICoreWebView2StagingFind : IUnknown {
429429

430430

431431
/// Interface defining the find configuration.
432-
/// This interface provides the necessary methods and properties to configure a search operation.
432+
/// This interface provides the necessary methods and properties to configure a find operation.
433433
// MSOWNERS: core ([email protected])
434434
[uuid(52a04b23-acc8-5659-aa2f-26dbe9faafde), object, pointer_default(unique)]
435435
interface ICoreWebView2StagingFindConfiguration : IUnknown {
@@ -523,31 +523,31 @@ namespace Microsoft.Web.WebView2.Core
523523
```csharp
524524
namespace Microsoft.Web.WebView2.Core
525525
{
526-
/// Specifies the direction of Search Parameters.
526+
/// Specifies the direction of find Parameters.
527527
[ms_owner("core", "[email protected]")]
528528
[availability("staging")]
529529
enum CoreWebView2FindDirection
530530
{
531-
/// Specifies a forward search in the document.
531+
/// Specifies a forward find in the document.
532532
Forward,
533-
/// Specifies a backwards search in the document.
533+
/// Specifies a backwards find in the document.
534534
Backward,
535535
};
536536

537537
runtimeclass CoreWebView2FindConfiguration : [default]ICoreWebView2FindConfiguration {}
538538

539539
/// Interface defining the find configuration.
540-
/// This interface provides the necessary methods and properties to configure a search operation.
540+
/// This interface provides the necessary methods and properties to configure a find operation.
541541
[com_interface("staging=ICoreWebView2StagingFindConfiguration")]
542542
[ms_owner("core", "[email protected]")]
543543
[availability("staging")]
544544
interface ICoreWebView2FindConfiguration
545545
{
546-
// Gets or sets the search term used for the find operation. Returns the search term.
546+
// Gets or sets the find term used for the find operation. Returns the find term.
547547
String FindTerm { get; set; };
548-
// Gets or sets the direction of the search operation (forward or backward). Returns the search direction.
548+
// Gets or sets the direction of the find operation (forward or backward). Returns the find direction.
549549
CoreWebView2FindDirection FindDirection { get; set; };
550-
// Determines if the search operation is case sensitive. Returns TRUE if the search is case sensitive, FALSE otherwise.
550+
// Determines if the find operation is case sensitive. Returns TRUE if the find is case sensitive, FALSE otherwise.
551551
Boolean IsCaseSensitive { get; set; };
552552
// Determines if only whole words should be matched during the find operation. Returns TRUE if only whole words should be matched, FALSE otherwise.
553553
Boolean ShouldMatchWord { get; set; };

0 commit comments

Comments
 (0)