In a WinRT
XAML
form I define a MaxLength
and also enable spellcheck-
<TextBox
Text="{Binding Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsSpellCheckEnabled="True"
MaxLength="255"
TextWrapping="Wrap"
IsTextPredictionEnabled ="True"
PlaceholderText="Description"
AcceptsReturn="False"
Foreground="Black"
BorderBrush="Gray"
FontSize="22"/>
Although MaxLength
happily works when typing directly in, yet there is a bug.
For example, if the last word gets truncated, eg: 'studies' becomes 'studie' due to lack of space, then spell check highlights 'studie' and allows you to select the correct spelling 'studies'.
No max length check is done and the length of the text in the control exceeds MaxLength
. This does not impress the back-end when the data is presented longer than expected.
What I am looking for is a way to handle this in all the fields with a minimum of code. I can certainly fix the view model for each field in the property set but was hoping to find a better way.
All suggestions greatly appreciated and spellchecked free of charge!
No takers? I can't really see an answer to this one. Some approaches-
Bottom line - Get spellcheck for free? Nothing is free.