2011-11-21 65 views
8

所以在WPF我可以聲明一個格式文本框,像這樣是否有使用澳大利亞英語詞典在WPF

<RichTextBox Text="{Binding Text}" SpellCheck.IsEnabled="True" /> 

,並通過一些奇蹟的小wibbly線下拼錯的詞出現的一種方式。

但是使用的方言是一種美國人,具有澳大利亞觀衆無法接受的各種差異。

我知道我能做到這一點...

<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> 

,並填寫與像這樣不同的話customwords.lex。

#LID 1033 
colour 
summarising 
Summarise 
Organisation 
maximise 
etc... 

坦率地說這是一個有點麻煩,我走出去,填補了自定義詞典的所有額外不同的話,它仍然不會凸顯美式英語,其錯在澳大利亞的環境。

我四處尋找.Net語言包,如果我只想要其他語言而不是英語方言,我想我會沒事的,但沒有可以使用的英語(澳大利亞或英國)。

我只是關閉拼寫檢查嗎?或者有沒有辦法在那裏獲得正確的詞典。

+1

這是一門真正的語言嗎? –

+3

是的,當這句話*「sav,mate的公平吸引力」*在它下面出現一個巨大的紅色曲線時,你會討厭它。 – slugster

+1

@slugster - 我的眼睛拒絕閱讀。 –

回答

4

我找到了解決方案,並創建了一個實現我想要的樣式。現在所有的RichTextBoxes都被拼寫檢查。

<Style TargetType="RichTextBox"> 
    <Setter Property="SpellCheck.IsEnabled" Value="True" /> 
    <Setter Property="Language" Value="en-au" /> 
</Style> 
相關問題