using System.Windows.Controls;
using System.Windows.Input;
namespace computercontrol
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
textbox.KeyDown += new KeyEventHandler(textbox_KeyDown);
}
static void textbox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
MessageBox.Show("Enter Pressed");
}
}
}
}