Class FindReplaceControl
Implements main control of the Find and Replace dialogs.
[ControlCategory("MenusAndToolbars")]
public class FindReplaceControl : ToolBarSet, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo, IFindReplaceControlHandler
- Inheritance
-
FindReplaceControl
- Implements
Remarks
Example of how a FindReplaceControl can look on different platforms:

Constructors
- FindReplaceControl()
Initializes a new instance of the FindReplaceControl class.
- FindReplaceControl(Control)
Initializes a new instance of the FindReplaceControl class.
Fields
- DefaultMinEditWidth
Gets or sets the default minimum width of the edit controls in the Find and Replace dialogs.
- DefaultNotFoundBorderDark
Gets or sets default border color of the find text editor in the case when search string is not found. This property contains default value for the dark color theme.
- DefaultNotFoundBorderLight
Gets or sets default border color of the find text editor in the case when search string is not found. This property contains default value for the light color theme.
- DefaultShowGearButton
Indicates whether the gear button is enabled by default.
Properties
- CanFindInAllOpenDocuments
Get or sets whether 'All Open Documents' find scope is available.
- CanFindInCurrentDocument
Get or sets whether 'Current Document' find scope is available.
- CanFindInCurrentProject
Get or sets whether 'Current Project' find scope is available.
- CanFindInSelectionOnly
Get or sets whether 'Current Project' find scope is available.
- CanFindNext
Gets whether the user can perform 'Find Next' action. Returns
trueif FindToolBar and 'Find Next' button are visible.
- CanFindPrevious
Gets whether the user can perform 'Find Previous' action. Returns
trueif FindToolBar and 'Find Previous' button are visible.
- CanMatchCase
Gets whether the user can perform 'Match Case' action. Returns
trueif OptionsToolBar and 'Match Case' button are visible.
- CanMatchWholeWord
Gets whether the user can perform 'Match Whole Word' action. Returns
trueif OptionsToolBar and 'Match Whole Word' button are visible.
- CanReplace
Gets whether the user can perform 'Replace' action. Returns
trueif ReplaceToolBar and 'Replace' button are visible.
- CanReplaceAll
Gets whether the user can perform 'Replace All' action. Returns
trueif ReplaceToolBar and 'Replace All' button are visible.
- CanUseRegularExpressions
Gets whether the user can perform 'Use Regular Expressions' action. Returns
trueif OptionsToolBar and 'Use Regular Expressions' button are visible.
- CloseButtonVisible
Gets or sets whether 'Close' button is visible.
- DefaultFindEditBorderColorDark
Gets or sets default border color of the find text editor. This property contains default value for the light color theme.
- DefaultFindEditBorderColorLight
Gets or sets default border color of the find text editor. This property contains default value for the light color theme.
- FindEditBorder
Gets border of the FindEdit.
- FindEditBorderColor
Gets border color of the find text editor.
- FindEditEmptyTextHint
Gets or sets a hint shown in an empty unfocused find text editor.
- FindEditor
Gets the find editor control as IControl.
- FindToolBar
Gets ToolBar with find buttons.
- IdFindClose
Gets id of the 'Close' button.
- IdFindEdit
Gets id of the 'Find' editor.
- IdFindNext
Gets id of the 'Find Next' button.
- IdFindPrevious
Gets id of the 'Find Previous' button.
- IdMatchCase
Gets id of the 'Match Case' button.
- IdMatchWholeWord
Gets id of the 'Match Whole Word' button.
- IdOptionsEmptyButton1
Gets id of the first empty button on the options toolbar.
- IdReplace
Gets id of the 'Replace' button.
- IdReplaceAll
Gets id of the 'Replace All' button.
- IdReplaceEdit
Gets id of the 'Replace' editor.
- IdReplaceEmptyButton1
Gets id of the first empty button on the replace toolbar.
- IdReplaceMoreActions
Gets id of the last empty button on the replace toolbar.
- IdScopeEdit
Gets id of the 'Scope' editor.
- IdToggleReplaceOptions
Gets id of the 'Toggle Replace Options' button.
- IdUseRegularExpressions
Gets id of the 'Use Regular Expressions' button.
- IsScopeAllOpenDocuments
Gets whether selected scope is 'All open documents'.
- IsScopeCurrentDocument
Gets whether selected scope is 'Current document'.
- IsScopeCurrentProject
Gets whether selected scope is 'Current project'.
- IsScopeEditEnabled
Gets or sets a value indicating whether the scope edit control is enabled.
- IsScopeSelectionOnly
Gets whether selected scope is 'Selection only'.
- Manager
Gets or sets FindReplaceControl.IFindReplaceConnect instance.
- MoreActionsMenu
Gets drop down menu for gear button. Use DefaultShowGearButton in order to show the gear button.
- NotFoundBorderColor
Gets or sets border color of the find text editor in the case when search string is not found.
- OptionFindTextAtCursor
Gets or sets 'Find Text At Cursor' option.
- OptionHiddenText
Gets or sets 'Hidden Text' option.
- OptionMatchCase
Gets or sets 'Match Case' option.
- OptionMatchCaseEnabled
Gets or sets whether 'Match Case' option is enabled.
- OptionMatchWholeWord
Gets or sets 'Match Whole Word' option.
- OptionMatchWholeWordEnabled
Gets or sets whether 'Match Whole Word' option is enabled.
- OptionPromptOnReplace
Gets or sets 'Prompt On Replace' option.
- OptionSearchUp
Gets or sets 'Search Up' option.
- OptionUseRegularExpressions
Gets or sets 'Use Regular Expressions' option.
- OptionUseRegularExpressionsEnabled
Gets or sets whether 'Use Regular Expressions' option is enabled.
- OptionUseRegularExpressionsVisible
Gets or sets whether 'Use Regular Expressions' option is visible.
- OptionsToolBar
Gets ToolBar with option buttons.
- OptionsVisible
Gets or sets whether OptionsToolBar is visible.
- ReplaceEdit
Gets ComboBox which allows to specify text to replace.
- ReplaceEditBorder
Gets border of the ReplaceEdit.
- ReplaceEditEmptyTextHint
Gets or sets a hint shown in an empty unfocused replace text editor.
- ReplaceEditor
Gets the replace editor control as IControl.
- ReplaceList
Represents the replace history.
- ReplaceToolBar
Gets ToolBar with replace buttons.
- ReplaceVisible
Gets or sets whether ReplaceToolBar is visible.
- Scope
Gets search scope as FindReplaceControl.SearchScope.
- ScopeEdit
Gets ListPicker which allows to specify text to find.
- ScopeItemAllOpenDocuments
Gets 'All Open Documents' item in the ScopeEdit.
- ScopeItemCurrentDocument
Gets 'Current Document' item in the ScopeEdit.
- ScopeItemCurrentProject
Gets 'Current Project' item in the ScopeEdit.
- ScopeItemSelectionOnly
Gets 'Selection Only' item in the ScopeEdit.
- SearchList
Represents the search history.
- ShowErrorBorder
Gets or sets whether to show error border around find text editor.
- TextBoxWidth
Gets or sets width of FindEdit and ReplaceEdit controls.
- TextToFind
Gets or sets the text to find in the search operation.
- TextToReplace
Gets or sets the text to replace in the replace operation.
- ToggleReplaceVisible
Gets or sets whether toggle replace options button is visible.
- WantKeys
Gets or sets whether keys specified in KnownShortcuts.FindReplaceControlKeys are automatically handled.
Methods
- CreateInsideDialog(bool)
Creates FindReplaceControl inside DialogWindow.
- CreateLogger()
Creates FindReplaceControl.IFindReplaceConnect instance which logs all method calls.
- HandleKeys(KeyEventArgs)
Handles keys specified in KnownShortcuts.FindReplaceControlKeys.
- OnClickClose(object?, EventArgs)
Handles the event when the "Close" button is clicked. Invokes the ClickClose event.
- OnClickFindNext()
Invokes the Find Next operation when the associated event is triggered.
- OnClickFindNext(object?, EventArgs)
Handles the event when the "Find Next" button is clicked. Invokes the ClickFindNext event and calls the FindNext() method on the Manager.
- OnClickFindPrevious()
Handles the event when the "Find Previous" button is clicked.
- OnClickFindPrevious(object?, EventArgs)
Handles the event when the "Find Previous" button is clicked. Invokes the ClickFindPrevious event and calls the FindPrevious() method on the Manager.
- OnClickMatchCase()
Handles the event when the "Match Case" option is clicked.
- OnClickMatchCase(object?, EventArgs)
Handles the event when the "Match Case" button is clicked. Toggles the state of the match case option.
- OnClickMatchWholeWord()
Handles the event when the "Match Whole Word" option is clicked.
- OnClickMatchWholeWord(object?, EventArgs)
Handles the event when the "Match Whole Word" button is clicked. Toggles the state of the OptionMatchWholeWord option.
- OnClickReplace()
Raises the click event for the replace action.
- OnClickReplace(object?, EventArgs)
Handles the event when the "Replace" button is clicked. Invokes the ClickReplace event and calls the Replace() method on the Manager.
- OnClickReplaceAll()
Handles the event when the "Replace All" button is clicked.
- OnClickReplaceAll(object?, EventArgs)
Handles the event when the "Replace All" button is clicked. Invokes the ClickReplaceAll event and calls the ReplaceAll() method on the Manager.
- OnClickToggleReplace(object?, EventArgs)
Handles the event when the "Toggle Replace" button is clicked. Toggles the visibility of the replace toolbar.
- OnClickUseRegularExpressions()
Invokes the event handler for the "Use Regular Expressions" button click event.
- OnClickUseRegularExpressions(object?, EventArgs)
Handles the event when the "Use Regular Expressions" button is clicked. Toggles the state of the option to use regular expressions.
- OnFindEditTextChanged(object?, EventArgs)
Handles the event when the text in the find editor is changed. Updates the find text in the Manager.
- OnKeyDown(KeyEventArgs)
Called when the KeyDown event is raised.
- OnReplaceEditTextChanged(object?, EventArgs)
Handles the event when the text in the replace editor is changed. Updates the replace text in the Manager.
- SelectAllTextInFindEditor()
Selects all the text in the find editor control.
- ToggleHiddenText()
Toggles searching through hidden text on/off.
- ToggleMatchCase()
Toggles case sensitive searching on/off.
- TogglePromptOnReplace()
Toggles the state of the prompt option for replace operations.
- ToggleRegularExpressions()
Toggles using regular expressions on/off.
- ToggleSearchUp()
Toggles searching direction towards/backwards.
- ToggleWholeWord()
Toggles searching for whole words on/off.
Events
- ClickClose
Occurs when 'Close' button is clicked.
- ClickFindNext
Occurs when 'Find Next' button is clicked.
- ClickFindPrevious
Occurs when 'Find Previous' button is clicked.
- ClickReplace
Occurs when 'Replace' button is clicked.
- ClickReplaceAll
Occurs when 'Replace All' button is clicked.
- OptionMatchCaseChanged
Occurs when option 'Match Case' is changed.
- OptionMatchWholeWordChanged
Occurs when option 'Match Whole Word' is changed.
- OptionUseRegularExpressionsChanged
Occurs when option 'Use Regular Expressions' is changed.