I have a text box. I want when user type in it as soon as the cursor leaves the text box, some hidden text fields become visible. How can this be done? Thanks.
Asked
Active
Viewed 3,455 times
2
-
try this http://stackoverflow.com/questions/833943/watermark-hint-text-textbox-in-wpf – Arul Dinesh Nov 04 '13 at 08:46
-
[LostFocus](http://msdn.microsoft.com/en-us/library/system.windows.uielement.lostfocus.aspx)? – Omri Btian Nov 04 '13 at 08:59
1 Answers
2
private void TextBox_OnLostFocus(object sender, RoutedEventArgs e)
{
myControl.Visibility = Visibility.Collapsed;
}
and in your XAML:
<TextBox LostFocus="TextBox_OnLostFocus"></TextBox>

Ketobomb
- 2,108
- 1
- 17
- 27