xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.9k stars 878 forks source link

With DateTimePicker Can't Access PART_TextBox #1762

Open shelbypo opened 1 year ago

shelbypo commented 1 year ago

Hello, I trying to access the PART_TextBox, So when I click the tab button on the date to go next date part gets null.

zhongruijia commented 1 year ago

这里是郭瑞的邮箱,已收到您的来件,我会尽快拜阅并给予您回复

XceedBoucherS commented 1 year ago

Hello, you can always create your own DateTimePicker and retrieve the PART_TextBox control from OnApplyTemplate(): ` public class MyDateTimePicker : DateTimePicker { public override void OnApplyTemplate() { base.OnApplyTemplate();

 var textBox = this.GetTemplateChild( "PART_TextBox" ) as TextBox;

} }`