【问题标题】:WPF Spell checkWPF 拼写检查
【发布时间】:2011-08-07 07:12:51
【问题描述】:

我正在使用 WPF 中的集成拼写检查。

我需要从后面的代码中动态配置它,而不仅仅是在 XAML 中。 XAML 解决方案完美运行(SpellCheck.IsEnabled=true + xml:lang 属性)。

但是,如果我尝试使用此代码 sn-p 启用拼写检查,它不起作用:

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); 
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
tb.SpellCheck.IsEnabled = true;

有什么想法吗?

非常感谢

【问题讨论】:

    标签: wpf xaml spell-checking


    【解决方案1】:
            tb.Language = System.Windows.Markup.XmlLanguage.GetLanguage("en-us");
            tb.SpellCheck.IsEnabled = true;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多