开发者

textBox1_Enter in wpf

开发者 https://www.devze.com 2023-03-24 00:22 出处:网络
What is the equivalent Following code in wpf code in winapp : private void textBox1_Enter(object sender, EventArgs e)

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"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消