DatePicker does not raise the KeyDown

Oct 15, 2009 at 2:44 PM


DatePicker control does not raise the KeyDown event when you press the enter key.

The code below don't print anything.

<StackPanel x:Name="stackPanel"
    <toolkit:DatePicker Margin="5"
                        KeyDown="datePicker_KeyDown" />
private void stackPanel_KeyDown(object sender, KeyEventArgs e)
    Console.WriteLine("Control: stackPanel - Key: {0}", e.Key);

private void datePicker_KeyDown(object sender, KeyEventArgs e)
    Console.WriteLine("Control: datePicker - Key: {0}", e.Key);

Oct 24, 2009 at 4:42 PM

I had a similar problem when trying to move the focus to another control after the Enter key was pressed.

I described the solution in this thread: