vladeck's junkyard

designer wannabe

SearchTextBox Behavior

on December 22, 2010

Damn, this was a tricky one – a bit of coding, a sprinkle of XAML and here it is. And it works. You can set this Behavior to any TextBox and turn it into Windows 7 search box like thingy. You can define your own Search and Clear icons (ImageSource) and (if you don’t want search-as-you-type) Search command (ICommand). The good thing is that it doesn’t affect the style/template you set for the TextBox, as it is implemented as Adorner.

Download here (rename .DOC to .RAR – wordpress limitation).

Advertisement

One Response to “SearchTextBox Behavior”

  1. Helge Klein says:

    Just found your blog, interestingly via a Google image search for “wpf togglebutton” while looking for inspiration. Keep up the good work!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.