Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 拼写检查器抛出错误?_C#_Wpf_Spell Checking - Fatal编程技术网

C# 拼写检查器抛出错误?

C# 拼写检查器抛出错误?,c#,wpf,spell-checking,C#,Wpf,Spell Checking,我正在使用WPF文本框拼写检查器,如下所示: <TextBox ... SpellCheck.IsEnabled="{Binding EnableSpelling}"... /> 我到处找了找,但找不到像这样的东西。有很多“密钥不存在”错误,但在拼写检查器或类似的程序中我找不到。我知道什么是key not found错误,但它使用的是什么字典,以及如何修复它,因为堆栈完全在.NET framework中,而不是在我的代码中 The given key was not present

我正在使用WPF文本框拼写检查器,如下所示:

<TextBox ... SpellCheck.IsEnabled="{Binding EnableSpelling}"... />
我到处找了找,但找不到像这样的东西。有很多“密钥不存在”错误,但在拼写检查器或类似的程序中我找不到。我知道什么是key not found错误,但它使用的是什么字典,以及如何修复它,因为堆栈完全在.NET framework中,而不是在我的代码中

The given key was not present in the dictionary.

   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at System.Windows.Documents.WinRTSpellerInterop.UnloadDictionary(Object token)
   at System.Windows.Documents.Speller.OnDictionaryUriRemoved(Uri uri)
   at System.Windows.Documents.Speller.OnDictionaryUriAdded(Uri uri)
   at System.Windows.Documents.Speller.SetCustomDictionaries(CustomDictionarySources dictionaryLocations, Boolean add)
   at System.Windows.Documents.TextEditor.SetCustomDictionaries(Boolean add)
   at System.Windows.Controls.SpellCheck.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Run(Object arg)
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)