Skip to content

Commit

Permalink
Update FindOnPage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmyers authored Jul 30, 2024
1 parent c062611 commit 18ea6f5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions FindOnPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ wil::com_ptr<ICoreWebView2FindConfiguration> AppWindow::InitializeFindConfigurat
wil::com_ptr<ICoreWebView2FindConfiguration> findConfiguration;
CHECK_FAILURE(webView2Environment5->CreateFindConfiguration(&findConfiguration));
CHECK_FAILURE(findConfiguration->put_FindTerm(findTerm.c_str()));
CHECK_FAILURE(findConfiguration->put_IsCaseSensitive(false));
CHECK_FAILURE(findConfiguration->put_ShouldMatchWord(false));
CHECK_FAILURE(findConfiguration->put_FindDirection(COREWEBVIEW2_FIND_DIRECTION_FORWARD));

// Query for the ICoreWebView2_17 interface to access the Find feature.
auto webView2_17 = m_webView.try_query<ICoreWebView2_17>();
Expand Down Expand Up @@ -164,10 +161,7 @@ async Task ConfigureAndExecuteFindWithDefaultUIAsync(string findTerm)
// Initialize the find configuration with specified settings.
var findConfiguration = new CoreWebView2FindConfiguration
{
FindTerm = findTerm,
IsCaseSensitive = false,
ShouldMatchWord = false,
FindDirection = CoreWebView2FindDirection.Forward
FindTerm = findTerm
};
// By default Find will use the default UI and highlight all matches. If you want different behavior
Expand Down Expand Up @@ -202,10 +196,7 @@ async Task ConfigureAndExecuteFindWithCustomUIAsync(string findTerm)
// Initialize the find configuration with specified settings.
var findConfiguration = new CoreWebView2FindConfiguration
{
FindTerm = findTerm,
IsCaseSensitive = false,
ShouldMatchWord = false,
FindDirection = CoreWebView2FindDirection.Forward
FindTerm = findTerm
};

// Specify that a custom UI will be used for the find operation.
Expand Down

1 comment on commit 18ea6f5

@ajtruckle
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason for removing the other properties from the CoreWebView2FindConfiguration object? It is informative to see the available properties listed.

Please sign in to comment.