コード例 #1
0
 private void SendBox_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         SendBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
     }
     if (e.Key == Key.RightCtrl)
     {
         SendBox.Text          += "\r\n";
         SendBox.SelectionStart = SendBox.Text.Length;
     }
 }