Example #1
0
 private void Enter_Click(object sender, RoutedEventArgs e)
 {
     if (EnterClicked != null)
     {
         EnterClicked.Invoke(this, EventArgs.Empty);
     }
 }
Example #2
0
 private void InputBox_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (sender is TextBox t && e.Key == VirtualKey.Enter)
     {
         e.Handled = true;
         EnterClicked?.Invoke(this, EventArgs.Empty);
     }
 }