I want a textbox where the user can shift-enter or ctrl-enter to add a newline without submitting. I found the following post on how to do ctrl-enter
http://social.msdn.microsoft.com/forums/en-US/wpf/thread/67ef5912-aaf7-43cc-bfb0-88acdc37f09c
works great! so i added my own block to capture shift enter like so:
else if (((keyData & swf.Keys.Shift) == swf.Keys.Shift) && ((keyData & swf.Keys.Enter) == swf.Keys.Enter) && Keyboard.FocusedElement == txtMessage)
{
// SHIFT ENTER PRESSED!
}
except now the box is capturing other shift combinations such as the question mark and squiggly braces and then adding a newline. What do I need to change to prevent this from happening?