I have an XAML Textbox that kind of acts as it's own Label.
Like the Experts Exchange search box.
Mine reads "Enter a search term"
Unlike the EE example, where the text clears on mouseenter, I'm using Windows Phone and programmatically set the focus to the textbox, so I need "Enter a search term" to disappear when the user starts to type.
I wrote this...
Private Sub tSearch_Keydown(sender As Object, e As KeyEventArgs)
If tSearch.Text = "Enter a search term" Then
tSearch.Text = e.Key.ToString
tSearch.SelectionStart = 2
tSearch.SelectionLength = 0
... which works fine unless the search term happens to begin with a number. I think it must be something to do with the keyboard switching key ?