Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个文本框。我希望当光标离开文本框时用户输入它时,一些隐藏的文本字段变得可见。如何才能做到这一点?谢谢。
private void TextBox_OnLostFocus(object sender, RoutedEventArgs e) { myControl.Visibility = Visibility.Collapsed; }
并在您的 XAML 中:
<TextBox LostFocus="TextBox_OnLostFocus"></TextBox>