jestem w stanie odtworzyć ten po mojej stronie. Dodaj to do kodu combobox:
Anyways, kto jest zainteresowany w tym problemu, StackTrace dla tego wyjątku jest następujący
PresentationFramework.dll MS.Internal.Data.PropertyPathWorker!. DetermineWhetherDBNullIsValid (pozycja obiektu) + 0xc7 bajty
PresentationFramework.dll! MS.Internal.Data.PropertyPathWorker.DetermineWhetherDBNullIsValid() + 0x64 bajtów
PresentationFramework.dll! MS.Internal.Data.PropertyPathWorker.IsDBNullValidForUpdate.get() + 0x2E bajtów PresentationFramework.dll! MS.Internal.Data.ClrBindingWorker.IsDBNullValidForUpdate.get() + 0xa bajtów PresentationFramework.dll System.Windows.Data.BindingExpression.ConvertProposedValue (wartość obiektu)! + 0x177 bajtów
systemu
PresentationFramework.dll! .Windows.Data.BindingExpressionBase.UpdateValue() + 0x92 bajtów
PresentationFramework.dll! System.Windows.Data.BindingExpression.UpdateOverride() + 0x3d bajty
PresentationFramework.dll! System.Windows.Data.BindingExpressionBase.Update() + 0x20 bajtów
PresentationFramework.dll! System.Windows.Data.BindingExpressionBase.ProcessDirty() + 0x2f bajtów PresentationFramework.dll! System.Windows.Data.BindingExpress ionBase.Dirty() + 0x40 bajtów
PresentationFramework.dll! System.Windows.Data.BindingExpressionBase.SetValue (System.WindowsDependencyObject d, System.WindowsDependencyProperty dp, wartość obiektu) + 0x24 bajtów
WindowsBase.dll! System.WindowsDependencyObject.SetValueCommon (System.WindowsDependencyProperty dp, wartość obiektu, metryki System.Windows.PropertyMetadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) + 0x3c4 bajty
WindowsBase.dll! System.WindowsDependencyObject.SetCurrentValueInternal (System.WindowsDependencyProperty dp, wartość obiektu) + 0x35 bajtów
PresentationFramework.dll! System.Windows.Controls.Primitives.Selector.UpdatePublicSelectionProperties() + 0x13f przez tes
PresentationFramework.dll! System.Windows.Controls.Primitives.Selector.SelectionChanger.End() + 0x80 bajtów
PresentationFramework.dll! System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem (System.Windows.Controls.ItemsControl.ItemInfo info, bool assumeInItemsCollection) + 0x145 bajtów systemu
PresentationFramework.dll! .Windows.Controls.Primitives.Selector.OnSelectedIndexChanged (System.WindowsDependencyObject d, System.WindowsDependencyChangedEventArgs e) + 0xd9 bajtów
WindowsBase.dll! System.WindowsDependencyObject.OnPropertyChanged (System.WindowsDependencyPropertyChangedEventArgs e) + 0x4d bajtów PresentationFramework.dll! System.Windows.FrameworkElement.OnPropertyChanged (System.WindowsDependencyPropertyChangedEventArgs e) + 0x50 bajtów
WindowsBase.dll! System.Windows .DependencyObject.NotifyPropertyChange (Argumenty System.WindowsDependencyPropertyChangedEventArgs) + 0x3b bajtów
WindowsBase.dll! System.WindowsDependencyObject.UpdateEffectiveValue (System.Windows.EntryIndex entryIndex, System.WindowsDependencyProperty dp, System.Windows.PropertyMetadata metadane, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) + 0x757 bajtów
WindowsBase.dll! System.Windows.DependencyObject.SetValueCommon (System.Windows.DependencyProperty dp, wartość obiektu, metadane System.Windows.PropertyMetadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) + 0x2ea bajty
WindowsBa se.dll! System.WindowsDependencyObject.SetCurrentValueInternal (System.WindowsDependencyProperty dp, wartość obiektu) + 0x35 bajtów
PresentationFramework.dll! System.Windows.Controls.ComboBox.TextUpdated (string newText, bool textBoxUpdated) + 0x26e bajtów
System.Windows.Controls.ComboBox.OnEditableTextBoxTextChanged (obiektu nadawcy System.Windows.Controls.TextChangedEventArgs e) + 0x2E bajtów PresentationFramework.dll! System.Windows.Controls.TextChangedEventArgs.InvokeEventHandler (System.Delegate genericHandler PresentationFramework.dll! , object genericTarget) + 0x2c bajtów
PresentationCore.dll! System.Windows.RoutedEventArgs.InvokeHandler (System.Delegate handler, obiekt docelowy) + 0x33 bajtów
PresentationCore.dll! System.W indows.RoutedEventHandlerInfo.InvokeHandler (target obiektu, System.Windows.RoutedEventArgs routedEventArgs) + 0x44 bajtów
System.Windows.EventRoute.InvokeHandlersImpl PresentationCore.dll! (źródło obiektu, System.Windows.RoutedEventArgs args, bool przebił) + 0x1a8 bajtów
PresentationCore.dll! System.Windows.UIElement.RaiseEventImpl (System.WindowsDependencyObject sender, Argumenty System.Windows.RoutedEventArgs) + 0x73 bajtów
PresentationCore.dll! System.Windows.UIElement.RaiseEvent (System.Windows.RoutedEventArgs e) + 0x29 bajtów PresentationFramework.dll! System.Windows.Controls.Primitives.TextBoxBase.OnTextChanged (System.Windows.Controls.TextChangedEventArgs e) + 0x5 bajtów
PresentationFramework.dll! System.Windows.Controls. Primitives.TextBoxBase.OnTextContainerChanged (obiekt nadawca, System.Windows.Documents.TextContainerChangedEventArgs e) + 0xe0 bajtów
PresentationFramework.dll! System.Windows.Controls.TextBox.OnTextContainerChanged (obiekt nadawca, System.Windows.Documents.TextContainerChangedEventArgs e) + 0x17d bajtów PresentationFramework.dll! System.Windows.Documents.TextContainer.EndChange (bool skipEvents) + 0xb6 bajtów
PresentationFramework.dll! System.Windows.Documents.TextContainer.System.Windows.Documents.ITextContainer.EndChange (bool skipEvents) + 0xb bajtów PresentationFramework.dll! System.Windows.Documents.TextRangeBase.EndChange (System.Windows.Documents.ITextRange thisRange, bool disableScroll, bool skipEvents) + 0x59 bajtów PresentationFramework.dll! System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.EndChange (bool disableScroll, skipEvents Bool) + 0x11 bajtów
PresentationFramework.dll! System.Windows.Documents.TextRange.ChangeBlock.System.IDisposable.Dispose() + 0x15 bajtów
PresentationFramework .dll! System.Windows.Documents.TextEditorTyping.OnDelete (obiekt nadawca, argumenty System.Windows.Input.ExecutedRoutedEventArgs) + 0x1a7 bajty
PresentationCore.dll! System.Windows.Input.CommandBinding.OnExecuted (obiekt nadawca, System.Windows .Input.ExecutedRoutedEventArgs e) + 0x65 bajtów PresentationCore.dll! System.Windows.Input.CommandManager.ExecuteCommandBinding (obiektu nadawcy System.Windows.Input.ExecutedRoutedEventArgs e System.Windows.Input.CommandBinding commandBinding) + 0x92 bajtów
PresentationCore.dll! System.Windows.Input.CommandManager.FindCommandBinding (System.Windows.Input.CommandBindingCollection commandBindings, object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) + 0x105 bajtów
PresentationCore.dll! System.Windows.Input.CommandManager.FindCommandBinding (obiekt nadawca, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) + 0x15e bajtów PresentationCore.dll! System.Windows.Input .CommandManager.OnExecuted (obiektu nadawcy System.Windows.Input.ExecutedRoutedEventArgs e) + 0x25 bajtów PresentationCore.dll! System.Windows.UIElement.OnExecutedThunk (obiektu nadawcy System.Windows.Input.ExecutedRoutedEventArgs e) + 0x46 bajtów
PresentationCore.dll! System.Windows.Input.ExecutedRoutedEventArgs.Invok eEventHandler (System.Delegate genericHandler, obiekt docelowy) + 0x3c bajty
PresentationCore.dll! System.Windows.RoutedEventArgs.InvokeHandler (uchwytu System.Delegate, obiekt docelowy) + 0x33 bajtów
PresentationCore.dll! System.Windows.RoutedEventHandlerInfo. InvokeHandler (target obiektu, System.Windows.RoutedEventArgs routedEventArgs) + 0x44 bajtów
System.Windows.EventRoute.InvokeHandlersImpl PresentationCore.dll! (źródło obiektu, System.Windows.RoutedEventArgs args, bool przebił) + 0x1a8 bajtów
PresentationCore.dll ! System.Windows.UIElement.RaiseEventImpl (System.WindowsDependencyObject sender, Argumenty System.Windows.RoutedEventArgs) + 0x73 bajtów
PresentationCore.dll! System.Windows.UIElement.Rais eTrustedEvent (System.Windows.RoutedEventArgs args) + 0x3d bajty
PresentationCore.dll! System.Windows.UIElement.RaiseEvent (System.Windows.RoutedEventArgs args, bool zaufany) + 0x40 bajtów
PresentationCore.dll! System.Windows.Input .RoutedCommand.ExecuteImpl (parametr obiektu, System.Windows.IInputElement target, bool userInitiated) + 0x105 bajtów
PresentationCore.dll! System.Windows.Input.RoutedCommand.ExecuteCore (parametr obiektu, System.Windows.IInputElement target, bool userInitiated) + 0x59 bajtów PresentationCore.dll! System.Windows.Input.CommandManager.TranslateInput (System.Windows.IInputElement targetElement, System.Windows.Input.InputEventArgs inputEventArgs) + 0x59b bajtów
PresentationCore.dll! System.Windows.UIE lement.OnKeyDownThunk (object sender, System.Windows.Input.KeyEventArgs e) + 0x52 bajtów
PresentationCore.dll! System.Windows.Input.KeyEventArgs.InvokeEventHandler (System.Delegate genericHandler, obiekt genericTarget) + 0x2c bajty
PresentationCore. System.Windows.RoutedEventArgs.InvokeHandler (handler System.Delegate, obiekt docelowy) + 0x33 bajtów
PresentationCore.dll! System.Windows.RoutedEventHandlerInfo.InvokeHandler (target obiektu, System.Windows.RoutedEventArgs routedEventArgs) dll! + 0x44 bajtów
PresentationCore.dll! System.Windows.EventRoute.InvokeHandlersImpl (źródło obiektu, argumenty System.Windows.RoutedEventArgs, bool reRaised) + 0x1a8 bajty
PresentationCore.dll! System.Windows.UIElement.RaiseEventImpl (System.Windows.DependencyObject nadawca, System.Windows.RoutedEventArgs args) + 0x73 bajtów
PresentationCore.dll! System.Windows.UIElement.RaiseTrustedEvent (System.Windows.RoutedEventArgs args) + 0x3d bajty
Systemu PresentationCore.dll! .Windows.UIElement.RaiseEvent (System.Windows.RoutedEventArgs args, bool zaufany) + 0x40 bajtów
PresentationCore.dll! System.Windows.Input.InputManager.ProcessStagingArea() + 0x1f8 bajtów
PresentationCore.dll! System.Windows. Input.InputManager.ProcessInput (wejście System.Windows.Input.InputEventArgs) + 0x45 bajtów PresentationCore.dll! System.Windows.Input.InputProviderSite.ReportInput (System.Windows.Input.InputReport inputReport) + 0x62 bajtów
PresentationCore.dll! System.Windows.Interop.HwndKeyboardInputProvider.ReportInput (System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, Akcje System.Windows.Input.RawKeyboardActions, int scanCode, bool isExtendedKey, bool isSystemKey, int virtualKey) + 0xee bajty PresentationCore.dll! System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction (ref System.Windows.Interop.MSG msg, odniesienie bool) + 0xac bajtów
PresentationCore.dll! System.Windows.Interop. HwndSource.CriticalTranslateAccelerator (ref System.Windows.Interop.MSG MSG System.Windows.Input.ModifierKeys modyfikatory) + 0x94 bajtów
PresentationCore.dll! System.Windows.Interop.HwndSource.OnPreprocessMessage (obiektu param) + 0x12c bajtów
WindowsBase.dll! System.Windows.Thr eading.ExceptionWrapper.InternalRealCall (System.Delegate wywołania zwrotnego, args obiektu, int numArgs) + 0x56 bajtów WindowsBase.dll! MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen (źródło obiektu, metoda System.Delegate, args obiektu, int numArgs, system .Delegate catchHandler) + 0x3a bajtów
WindowsBase.dll! System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.Dispatcher Priorytet priorytetu, timeout System.TimeSpan, metoda System.Delegate, args obiektu, int numArgs) + 0x10e bajty WindowsBase.dll! System.Windows.Threading.Dispatcher.Invoke (Priorytet System.Windows.Threading.DispatcherPriority, Metoda System.Delegate, obiekt arg) + 0x3e bajtów
PresentationCore.dll! System.Windows.Interop.HwndSource. OnPreprocessMessageThunk (ref. System.Windows.Interop.MSG msg, ref bool handled) + 0x93 bajtów
PresentationCore.dll! System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage (ref System.Windows.Interop.MSG msg, ref bool obsługiwane) + 0x33 bajtów
WindowsBase.dll! System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage (ref. System.Windows.Interop.MSG msg) + 0x3c bajtów
WindowsBase.dll! System.Windows.Threading.Dispatcher.PushFrameImpl (System.Windows.Threading.DispatcherFrame frame) + 0x9a bajtów
WindowsBase.dll! System. Windows.Threading.Dispatcher.PushFrame (System.Windows.Threading.DispatcherFrame frame) + 0x49 bajtów
WindowsBase.dll! System.Windows.Threading.Dispatcher.Run() + 0x4b bajtów
Obecny ationFramework.dll! System.Windows.Application.RunDispatcher (ignorowanie obiektu) + 0x17 bajtów
PresentationFramework.dll! System.Windows.Application.RunInternal (okno System.Windows.Window) + 0x6f bajtów PresentationFramework.dll! System.Windows .Application.Run (okno System.Windows.Window) + 0x26 bajtów PresentationFramework.dll! System.Windows.Application.Run() + 0x1b bajtów WpfApplication1.exe! WpfApplication1.App.Main() + 0x59 bajtów C# [ Natywny do zarządzanego przejścia]
[Zarządzane na rodzime przejście]
mscorlib.dll! System.AppDomain.ExecuteAssembly (string assemblyFile, System.Security.Policy.Dowody assemblySecurity, string [] args) + 0x6b bajtów
Microsoft.VisualStudio.HostingProcess.Utilities.dll! Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x27 bajtów
mscorlib.dll! System.Threading.ThreadHelper.ThreadStart_Context (stan obiektu) + 0x6f bajtów
mscorlib.dll! System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback zwrotna, stan obiektu, bool preserveSyncCtx) + 0xa7 bajtów
mscorlib.dll! System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, stan obiektu, bool preserveSyncCtx) + 0x16 bajtów
mscorlib.dll! Sys tem.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback zwrotna, stan obiektu) + 0x41 bajtów
mscorlib.dll! System.Threading.ThreadHelper.ThreadStart() + 0x44 bajtów
[Native do Zarządzane Transition]
można wyjaśnić nieco więcej, co masz na myśli, gdy mówisz, że wchodzimy i usuwanie elementów? Czy to w interfejsie użytkownika? Lub w kodzie? lub...? – Tim
Po uruchomieniu aplikacji w debugerze właściwość combobox IsEditable = "True". Dlatego mogę dodawać i usuwać tekst z combobox. Przepraszam, będę edytować, aby to wyjaśnić. – poco
Na pierwszy rzut oka twój kod wygląda idealnie i powinien działać za jednym razem. Więc spróbowałem i działało zgodnie z oczekiwaniami. Tak więc podany kod nie stanowi problemu. – Nitesh