I use AvalonEdit:TextEditor
. Can i enable quick search dialog (on Ctrl-F for example) for this control? Or maybe someone has code for search words into AvalonEdit:TextEditor
text?
There isn't much documentation about it, but AvalonEdit does have a built in SearchPanel class that sounds exactly like what you want. There is even a SearchInputHandler class that makes it trivial to get it hooked up to your editor, responding to keyboard shortcuts, etc. Here is some sample code that attached the standard search logic to an editor:
myEditor.TextArea.DefaultInputHandler.NestedInputHandlers.Add(new SearchInputHandler(myEditor.TextArea));
Here is a screenshot of what it will look like (this is taken from ILSpy which uses AvalonEdit). You can see the search control in the top right, the search options it supports, and the automatic highlighting it does of matching results.
There isn't any support for replace...but if you just need searching, this can be a great solution.