Interviews1 answer
code in C# to perform the same operation of button Enter
1 Answer
private void OnKeyDownHandler(object sender, KeyEventArgs e)
{
if (e.Key == Key.Return)
{
textBlock1.Text = "You Entered: " + textBox1.Text;
}
}
If the key that is pressed is the Enter key, a message is displayed in the TextBlock.
Farhan ShariffPosted Mar 18, 2014, 2:51 AM EDT
