有没有办法在 Windows Phone 上为 TextBox 组合或创建自定义输入范围?
我需要文本输入范围的自动更正功能,但我还希望搜索输入范围提供白色提交按钮(否则用户不直观地了解如何从框中继续操作)。
有没有办法编写自己的InputScopes,以便我可以独立控制这些功能?或者有没有一种方法可以应用多个范围来实现组合功能?
这是代码:
这有按钮但没有自动更正:
<TextBox x:Name="InputBox" InputScope="Search" AcceptsReturn="False" KeyUp="InputBox_KeyUp"/>
这有自动更正但没有按钮:
<TextBox x:Name="InputBox" InputScope="Text" AcceptsReturn="False" KeyUp="InputBox_KeyUp"/>
作为记录,我已阅读 这篇文章,我真的希望它不会发展到这一点。
I need the auto-correct functionality of the Text InputScope, but I also want the white submit button provided with the Search InputScope (otherwise it isn't intuitive to users how to proceed from the box).
Is there any way to write my own InputScopes so that I can control these features independently? Or is there a way to apply more than one scope for combined functionality?
Here's the code:
This has the button but no auto-correct:
<TextBox x:Name="InputBox" InputScope="Search" AcceptsReturn="False" KeyUp="InputBox_KeyUp"/>
And this had auto-correct but no button:
<TextBox x:Name="InputBox" InputScope="Text" AcceptsReturn="False" KeyUp="InputBox_KeyUp"/>
For the record, I've read this post and I really hope it doesn't come to that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
InputScope="Maps"
将显示地图应用程序使用的键盘,其中包括字典和白色提交按钮。我从“文本”键盘中看到的唯一区别是它不是以大写字母开头,也没有表情符号键。InputScope="Maps"
will show the keyboard used by the Maps app, which includes both the dictionary and white submit button. The only differences that I can see from the "Text" keyboard is that it doesn't start out with a capital letter and doesn't have a key for emoticons.在您的代码隐藏中,在您的
Page_Loaded
事件中(例如),尝试添加如下内容:这应该有望为您提供来自
Text
dictionary code> 输入范围,同时还有一个来自Search
输入范围的白色提交按钮。In your code-behind, in your
Page_Loaded
event (for example), try adding something like this:This should hopefully give you the
dictionary
from theText
input scope whilst also having a white submit button from theSearch
input scope.