Soft keyboard capital initially

淺唱寂寞╮ 提交于 2019-12-07 04:38:14

问题


I want that when a user taps on a TextBox the keyboard should be capital initially and then small case after entering first character.

I have seen this in calendar app. When you tap on Add title the shift key is initially on and when you tap on Add a message it's off
Here are the screen shots..

Screen shot #1



Screen shot #2


回答1:


Here is a quick summary of the different InputScope types you can set for the on-screen keyboad. http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh393998(v=vs.105).aspx

It sounds like "Text" worked for you, but "Chat" will also begin with a capital. The difference is that "Chat" does not auto-correct.




回答2:


I was looking for this. In WP 8, it's done by defining InputScope to text:

<TextBox x:Name="DescriptionTextBox" InputScope="Text"/>



回答3:


You can use attached behavior with your text block control which listen to key pressed events, which can then accordingly convert the character casing as you desire.



来源:https://stackoverflow.com/questions/13472075/soft-keyboard-capital-initially

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!