We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

event only on the textbox


I have to make the keyboard appear while pressing the touch on the textbox area.

The problem is that I don't have to trigger the event while setting via the up and down buttons

See Attachment

It would be perfect to recover the click event on the text part.

it's possible?

Attachment: wpfappmaster_29c0015b.zip

8 Replies

BA BagavathiPerumal Apranandham Syncfusion Team March 24, 2023 04:40 AM UTC

Hi Edoardo Gazzola,

You can achieve your requirement by accessing the text area (DoubleTextBox) through VisualTree and then raising the event using AddHandler. We have created a simple sample based on your requirement please refer to the sample for your reference.


DoubleTextBox doubleText=updown.Template.FindName("DoubleTextBox",updown) as DoubleTextBox;

If (doubleText!=null)


doubleText.AddHandler(DoubleTextBox.PreviewMouseDownEvent, new MouseButtonEventHandler(DoubleText_PreviewMouseDown), true);


Bagavathi Perumal A

Attachment: Updown_(1)_5f92915f.zip

EG Edoardo Gazzola March 24, 2023 11:09 AM UTC

Hi Bagavathi Perumal,

Thank you fro your answer,

I confirm that your suggestion works.

But I notice that after the popup appears I have to make two taps instead of one as if the first tap is to get the focus of the popup.

Can you give me some suggestions on this?

EG Edoardo Gazzola March 24, 2023 11:18 AM UTC

I have attached a video

Attachment: 20230324_121343_f5abf930.zip

EG Edoardo Gazzola March 28, 2023 12:53 PM UTC

Hi Bagavathi Perumal,

I also tried the Activate and Focus window methods once it loaded with no success.

Attached is the project.


Attachment: wpfappmaster_e3dd2a14.zip

EG Edoardo Gazzola March 28, 2023 04:10 PM UTC

Hi Bagavathi Perumal,

I'm currently solving by wrapping the ShowDialog method with Dispatcher.BeginInvoke

Do you think it is correct...?

BA BagavathiPerumal Apranandham Syncfusion Team March 30, 2023 10:16 AM UTC

Hi Edoardo Gazzola,

Yes, you can use Dispatcher.BeginInvoke to achieve your requirement.

Bagavathi Perumal A

EG Edoardo Gazzola March 30, 2023 10:29 AM UTC

Hi Bagavathi Perumal,

Thank you for your technical support.


BA BagavathiPerumal Apranandham Syncfusion Team March 31, 2023 06:19 AM UTC

Hi Edoardo Gazzola,

We hope that your issue is resolved. Please let us know if you need any other assistance. We are happy to assist you.

Bagavathi Perumal A

Live Chat Icon For mobile
Up arrow icon