So In WPF I can declare a Rich Text Box like so
<RichTextBox Text="{Binding Text}" SpellCheck.IsEnabled="True" />
and through some miracle little wibbly lines appear under misspelt words.
But the dialect used is an American that has all kinds of differences that are unacceptable for an Australian audience.
I know I can do this...
<RichTextBox Text="{Binding Text}" SpellCheck.IsEnabled="True" >
<SpellCheck.CustomDictionaries>
<!-- customwords.lex is included as a content file-->
<sys:Uri>pack://application:,,,/customwords.lex</sys:Uri>
</SpellCheck.CustomDictionaries>
</RichTextBox>
and fill customwords.lex with the words that are different like so.
#LID 1033
colour
summarising
Summarise
Organisation
maximise
etc...
Frankly it is a little onerous for me to go out and fill the custom dictionary with all the extra different words and it still won't highlight the Americanisms which wrong in an Australian context.
I looked around for .Net Language packs and if I wanted just about any other language than a dialect of English I think I'd be alright but there is no English (Australian or UK) that I can use.
Do I just turn off spell checking? or is there a way to get the right Dictionary in there.
I found the solution and created a style that achieves what I want. Now all RichTextBoxes are spell checked appropriately.
<Style TargetType="RichTextBox">
<Setter Property="SpellCheck.IsEnabled" Value="True" />
<Setter Property="Language" Value="en-au" />
</Style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With