title: Default Text in silverlight search text box
body: <p>I need a feature in silverlight text box, simillar functionality as in Ask Question "Title" textbox in stalkoverflow. When there's no text in textbox then it should display "Search". When user clicked on the textbox then textbox text should be empty and in textbox lost focus if the text is empty then show "Search". I wrote the following code, but is there any code which handles all possible conditions?</p>
  
  <pre><code>private void txtAvailable_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
   {
              txtAvailable.Text = "";
   }
  
   private void txtAvailable_LostFocus(object sender, RoutedEventArgs e)
   {
              if (txtAvailable.Text.Trim() == "")
                  txtAvailable.Text = "Search";
   }
  </code></pre>