private void CalendarSelectedDatesChanged(object sender, SelectionChangedEventArgs e) { _popup.IsOpen = false; _datePickerTextBox.Text = _calendar.SelectedDate.ToString(); _datePickerTextBox.Focus(); _datePickerTextBox.Select(0, 4); }
private void Dp_geburtsdatum_Loaded(object sender, RoutedEventArgs e) { DatePickerTextBox datePickerTextBox = (DatePickerTextBox)dp_geburtsdatum.Template.FindName("PART_TextBox", dp_geburtsdatum); if (datePickerTextBox != null) { datePickerTextBox.Focus(); } }