private void Window_Loaded(object sender, RoutedEventArgs e)
{
DatePickerTextBox datePickerTextBox
= (DatePickerTextBox)datePicker1.Template.FindName("PART_TextBox", datePicker1);
datePickerTextBox.AddHandler(DatePickerTextBox.KeyDownEvent,
new KeyEventHandler(DatePickerTextBox_Keydown), true);
}
private void DatePickerTextBox_Keydown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
// 他のコントロールにフォーカス
textBoxPrice.Focus();
}
}