textBox1_Enter in wpf
What is the equivalent Following code in wpf
code in winapp :
private void textBox1_Enter(object sender, EventArgs e)
{
开发者_高级运维 MessageBox.Show("www.stackoverflow.com");
}
There is no Enter
event on a WPF textbox - you could use the GotFocus event to the same effect though.
private void textbox1_GotFocus(object sender, System.Windows.RoutedEventArgs e)
{
MessageBox.Show("www.stackoverflow.com");
}
this is accessed in the XAML as follows:
<TextBox GotFocus="textbox1_GotFocus"/>
精彩评论