更新时间:2023-02-03 14:57:07
如果您的键盘禁用了拼写检查,则会忽略 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
.
If a Keyboard has been set that disables spell checking, such as Keyboard.Chat, the IsSpellCheckEnabled property is ignored. Therefore, the property cannot be used to enable spell checking for a Keyboard that explicitly disables it.