Sdílet prostřednictvím


CoreWebView2FindOptions Class

Definition

Interface defining the find options. This interface provides the necessary methods and properties to configure a find session.

public class CoreWebView2FindOptions
type CoreWebView2FindOptions = class
Public Class CoreWebView2FindOptions
Inheritance
CoreWebView2FindOptions

Properties

FindTerm

Gets or sets the word or phrase to be searched in the current page. You can set FindTerm to any text you want to find on the page. This will take effect the next time you call the Start() method.

IsCaseSensitive

Determines if the find session is case sensitive. Returns TRUE if the find is case sensitive, FALSE otherwise. When toggling case sensitivity, the behavior can vary by locale, which may be influenced by both the browser's UI locale and the document's language settings. The browser's UI locale typically provides a default handling approach, while the document's language settings (e.g., specified using the HTML lang attribute) can override these defaults to apply locale-specific rules. This dual consideration ensures that text is processed in a manner consistent with user expectations and the linguistic context of the content.

ShouldHighlightAllMatches

Gets or sets the state of whether all matches are highlighted. Returns TRUE if all matches are highlighted, FALSE otherwise. Note: Changes to this property take effect only when Start, FindNext, or FindPrevious is called. Preferences for the session cannot be updated unless another call to the Start function on the server-side is made. Therefore, changes will not take effect until one of these functions is called.

ShouldMatchWord

Similar to case sensitivity, word matching also can vary by locale, which may be influenced by both the browser's UI locale and the document's language settings. The browser's UI locale typically provides a default handling approach, while the document's language settings (e.g., specified using the HTML lang attribute) can override these defaults to apply locale-specific rules. This dual consideration ensures that text is processed in a manner consistent with user expectations and the linguistic context of the content. ShouldMatchWord determines if only whole words should be matched during the find session. Returns TRUE if only whole words should be matched, FALSE otherwise.

SuppressDefaultFindDialog

Sets this property to hide the default Find UI. You can use this to hide the default UI so that you can show your own custom UI or programmatically interact with the Find API while showing no Find UI. Returns TRUE if hiding the default Find UI and FALSE if using showing the default Find UI. Note: Changes to this property take effect only when Start, FindNext, or FindPrevious is called. Preferences for the session cannot be updated unless another call to the Start function on the server-side is made. Therefore, changes will not take effect until one of these functions is called.

Applies to