Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With DateTimePicker Can't Access PART_TextBox #1762

Open
shelbypo opened this issue Nov 6, 2023 · 2 comments
Open

With DateTimePicker Can't Access PART_TextBox #1762

shelbypo opened this issue Nov 6, 2023 · 2 comments

Comments

@shelbypo
Copy link

shelbypo commented Nov 6, 2023

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
Copy link

zhongruijia commented Nov 6, 2023 via email

@XceedBoucherS
Copy link
Collaborator

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;

}
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants