Both the PrintPreview and RibbonPreview libraries provide the Text Search Panel control to enable the end-user to search text within the document displayed on the preview pane. To invoke the text search panel, you can press the CTRL + F key combination, or use the Search command in the top toolbar of the PrintPreview control (or RibbonPreview control).
The available search options are as given below:
Match Case : Matches letter casing while performing the text search.
Match Whole: Matches the entire search text only.
Search Up: Specifies if the text search can be performed from the bottom of the control up.
The search panel can be hid after usage by clicking the Hide button. Further, you can click the Search button on the toolbar or use the shortcut key (CTRL + F) once again to hide the search panel.
The PrintPreview and RibbonPreview libraries also provide the users with two UI-style options for the Text Search control, panel (default) and toolbar.
To add a toolbar-style search panel, use the following code snippet:
C# |
Copy Code
|
---|---|
c1PrintPreviewControl1.TextSearchUIStyle = TextSearchUIStyle.ToolBar; |
The resulting output on invoking the search command is as follows: