![Avatar](https://secure.gravatar.com/avatar/aea66dc5ea08c2b7636e17787e80dedf.jpg?s=64&d=identicon&r=g)
Is there a built-in command for showing the find/replace dialog?
Thx,
Nick.
Is there a built-in command for showing the find/replace dialog?
Thx,
Nick.
Also, is there a reason why ScrollBarTrayTemplates have no datacontext? I'm wondering how to set commands for buttons there.
Hi Nick,
Sorry but there isn't a built-in dialog. We do however have the EditorSearchView control that you can embed in any dialog of your own to provide the find/replace UI. Please see our QuickStarts for samples on how to use it.
I don't believe we set any DataContext on the ScrollBarTrayTemplates at the moment. What do you think it should be set to?
Well, your suggestion is exactly what I did. I built up a little helper to wire up the search functionality with an EditorSearchView. The issue I ran into was that I have a search button in the scroll bar tray, and I wasn't able to just bind its command property (I would have expected it to have the same datacontext as the parent control). Instead I had to walk the visual tree to find it and explicitly set its datacontext.
This seems like it could be a good addition: Add a built-in command which launches a EditorSearchView. Then all I need to do is add an inputbinding for ctrl + f and point my scrolltray button to that command.
Please log in to a validated account to post comments.