We’ve spent the past several days working on find/replace functionality in SyntaxEditor for WPF. This is one of the few remaining feature areas that needs to be finished before we release a public beta.
The core document find/replace model has been in place for a while now, but we’ve started working on the view find/replace model. The view model is more interactive with the UI view such as where the caret is, when you search past the end of the document, etc. The view model harnesses the searching functionality provided by the core document model.
Editor search control UI
One thing we’ve been wanting to do for a while is make a standard WPF control that can be styled/templated but provides a good default implementation of a find/replace control like in Visual Studio. We just completed the UI for that control. Let’s take a peek…
|

The EditorSearchControl in “find” mode and appearing within a Docking/MDI for WPF tool window
|
The EditorSearchControl looks like the above screenshot by default. You can click between the Quick Find and Quick Replace buttons to toggle the mode of the control.
|

The EditorSearchControl in “replace” mode
|
In the above screenshot, we clicked the Quick Replace button and the Replace with textbox, Replace and Replace All buttons animate and slide into view. It’s a really neat effect. In this mode, you can do replaces instead of standard finds.
You can click the “+” button or the Find options header to expand out the options panel.
|

The EditorSearchControl in “replace” mode with its options panel expanded
|
This screenshot shows the options panel (which also animates into view), where you can set common find options.
You can set the mode programmatically. You also can choose to place the control in your own window or container, and even have an option to hide the mode toolbar at the top.
All in all, we think this will be a very nice implementation for driving the search functionality in your SyntaxEditor implementations.
Getting your feedback
As we begin work on tying together the UI seen above with the core document find/replace functionality, we would like to get your feedback.
Do you have any suggestions for improving the UI further? Do you like what you see? Please post some comments. Thanks!