Answered by:
TextBox not receiving touch input

Question
-
Dear all,
I have build a simple WPF application with a simple list box which have as a test following Items layout
<StackPanel Orientation="Horizontal"> <TextBlock x:Name="_price" Text="{Binding StringSpecialOfferPrice,UpdateSourceTrigger=PropertyChanged}" Foreground="{DynamicResource ProductPrice}" Style="{DynamicResource DetailCardTitle}" Margin="5,0,0,0"/> <TextBlock Text="X" Style="{DynamicResource DetailCardTitle}" VerticalAlignment="Center" Foreground="{DynamicResource ProductDetailMainText}" Margin="5,0,10,0"/> <TextBox Text="{Binding Quantity,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource RoundedTextBoxStyle}" Background="Transparent" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="20" FontWeight="SemiBold" Foreground="Black" Width="59" /> </StackPanel>
What is happening is that when I touch the TextBox it is not receiving the touch or something prevent it so that I am not able to go in edit mode. Clicking with mouse inside works of course.
I am running it under W7 and Framwework 4
Any reason ?
thnaks
Friday, May 2, 2014 5:25 PM
Answers
-
Hi,
Based on your code snippet, I created a WPF project on my side and test it. I removed the style for textbox. Since I did not have the specify style. J
I tested it on a Win8.1 touch device. It works fine. I suggested adding a textbox in the windows. We didn’t set any properties for the textbox, and test it. I am afraid that maybe there are some other properties caused this issue.
If the application run on a touch device, I suggested using Surface SDK control. It is a better choice.
http://msdn.microsoft.com/en-us/library/ff727746.aspx
http://www.microsoft.com/en-us/download/details.aspx?id=26716
Have a nice time!
Sincerely,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Leo (Apple) Yang Thursday, May 8, 2014 8:24 AM
- Marked as answer by wakefun Friday, May 9, 2014 6:42 AM
Wednesday, May 7, 2014 3:30 AM
All replies
-
Hi,
How can you use Virtual Keyboard in your WPF application? Do you create a touch screen keyboard by yourself and use Sendkey to the TextBox? Here is a related topic about WPF virtual keyboard. Just for your reference.
http://www.codeproject.com/KB/WPF/TouchScreenKeyboardWPF.aspx
Also, I did some researches for this issue, please refer to the thread below,
How to make WPF input control show virtual Keyboard when it got focus in touch screen?
Here is a code sample on MSDN about the virtual keyboard,
Automatic Touch Keyboard for TextBoxes in WPF Applications on Windows 8+
Have a nice time!
Sincerely,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Monday, May 5, 2014 5:33 AM -
Hello thanks for your reply,
I am not talking about virtual keyboard here, I am talking about the simple fact that if I touch my text box, it does not receive the touch input.
Any idea?
Monday, May 5, 2014 6:49 AM -
Hi,
Based on your code snippet, I created a WPF project on my side and test it. I removed the style for textbox. Since I did not have the specify style. J
I tested it on a Win8.1 touch device. It works fine. I suggested adding a textbox in the windows. We didn’t set any properties for the textbox, and test it. I am afraid that maybe there are some other properties caused this issue.
If the application run on a touch device, I suggested using Surface SDK control. It is a better choice.
http://msdn.microsoft.com/en-us/library/ff727746.aspx
http://www.microsoft.com/en-us/download/details.aspx?id=26716
Have a nice time!
Sincerely,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Leo (Apple) Yang Thursday, May 8, 2014 8:24 AM
- Marked as answer by wakefun Friday, May 9, 2014 6:42 AM
Wednesday, May 7, 2014 3:30 AM