问题描述
我正在使用Xamarin.Forms开发聊天应用程序.我有拼写检查的要求.我正在使用 Editor
输入消息.
在 Editor
中如果用户键入某些内容,则必须检查单词的拼写,并告知用户下划线或其他内容的拼写错误(例如,语法在Web中是正确的).如何使用Xamarin.Forms实现此目的.
我尝试使用Xamarin.Forms默认属性 IsSpellCheckEnabled
,但是它没有任何作用,即不检查拼写.是否有任何解决方法来实现这一目标.在下图中,错误拼写的单词用蓝色下划线标出.我想这样做,但是对如何实现这一目标一无所知.谁能帮我这个忙.谢谢.
如果您的键盘禁用了拼写检查,则会忽略 IsSpellCheckEnabled
属性.因此,请尝试首先从您的设备启用拼写检查.有关更多信息,请访问
I am developing a chat application using Xamarin.Forms. I have a requirement of spell checking. I am using an Editor
to enter the message.
In Editor
If user types something it has to check the spelling of the word and inform the user that spelling is wrong with an underline or something(ike Grammarly does in web). How can I achieve this using Xamarin.Forms.
I have tried with Xamarin.Forms default property IsSpellCheckEnabled
but it doesn't effect anything i.e It doesn't check the spellings. Is there any workaround to achieve this. In the below image the wrong spelled word is underlined with blue color. I want to do it like this but don't have any idea on how to achieve this. Can anyone please help me with this. Thank you.
If your Keyboard disables spell checking, IsSpellCheckEnabled
property is ignored. So try to enable spell check first from your device. For more info visit docs.microsoft. Sample code
<Editor AutoSize="TextChanges" IsSpellCheckEnabled="True" VerticalOptions="StartAndExpand"
HorizontalOptions="FillAndExpand">
</Editor>
Note: If in your keypad auto correct option in enabled, after hitting enter/space wrong spelling would correct automatic and it wouldn't show you underline text.
Update: Also set IsTextPredictionEnabled="True"
in your Editor
.
这篇关于使用xamarin.forms应用程序在编辑器中进行拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!