Я боролся с этой проблемой, в течение 2 дней я сделал приложение WPF с W7.приложение отлично работает с W7, но когда я хочу запустить его с W10.Это работает с самого начала, но когда я хочу открыть окно, оно вылетает, я пытался отладить некоторый MessageBox в моем коде позади, но когда он вызывает mutliValueconverter и вылетает, я зашел в журнал событий и получил ошибку с KernelBase.dll.Вот мой класс MultiValueConverter и скриншот ошибки в журнале событий [! Text] [журнал событий 1] 1
РЕДАКТИРОВАТЬ: Мой экран трассировки стека был неполным, вот трассировка полного стека в XMLformat Может кто-нибудь еще раз сказать, что это не работает для меня
Приложение: EasyMaintenance.exe Версия du Framework:
v4.0.30319 Описание: процесс может быть исключительным, если не исключение.Сведения об исключении: System.InvalidOperationException ® System.Windows.TriggerBase.Seal () ® System.Windows.Trigger.Seal () ® System.Windows.TriggerCollection.Seal () ® System.Windows.Style.Seal () ®System.Windows.StyleHelper.UpdateStyleCache (System.Windows.FrameworkElement, System.Windows.FrameworkContentElement, System.Windows.Style, System.Windows.Style, System.Windows.Style ByRef) à System.Windows.FrameworkElement.OnStyleCang (Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.PropertyChangedCallback.Invoke (System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.DependedOg.Wevent.WeventProWeper.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wevent.Wer.Oper.Wer.FrameworkElement.OnPropertyChanged (System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.DependencyObject.NotifyPropertyChange (System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.DependencyObject.UpdateEffectiveValue (System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.We.DependencyObject.CoerceValue (System.Windows.DependencyProperty) à System.Windows.Controls.DataGridHelper.TransferProperty (System.Windows.DependencyObject, System.Windows.DependencyProperty) à System.Windows.Control.DataGridCumnCW.Ont.DataGridColumn, System.Windows.Controls.DataGridColumn) à System.Windows.Controls.DataGridCell.OnColumnChanged (System.Object, System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.DependencyObdency.gsedEd.FrameworkElement.OnPropertyChanged (System.Windows.DependencyPropertyChangedEventArgs) à System.Windows.DependencyObject.NotifyPropertyChange (System.Windows.DependencyPropertyChangedEventArgs) System.Windows.DependencyObject.UpdateEffectiveValue (System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, Boole., Boole. System. Boole.Windows.OperationType) à System.Windows.DependencyObject.SetValueCommon (System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, логическое значение, логическое значение, System.Windows.OperationType, логическое значение) à System.WindowsjectSepenOSystem.Windows.DependencyPropertyKey, System.Object) à System.Windows.Controls.DataGridCell.PrepareCell (System.Object, System.Windows.Controls.DataGridRow, Int32) à System.Windows.Controls.Primitives.DataGridCellsPresenter.PrepareContainerForItemOverride (System.Windows.DependencyObject, System.Object) à System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer (System.Windows.DependencyObject) à System.Windows.Controls.DataGridCellsPanel.InsertContainer (Int32, System.Windows.UieleClement)DataGridCellsPanel.AddContainerFromGenerator (Int32, System.Windows.UIElement, Boolean) à System.Windows.Controls.DataGridCellsPanel.GenerateChild (System.Windows.Controls.Primitives.IItemContainerGenerator, System.Wrols.Gat32.Gindows.izeByRef, System.Windows.Size ByRef) à System.Windows.Controls.DataGridCellsPanel.DetermineRealizedColumnsBlockList (System.Windows.Size) à System.Windows.Controls.DataGridCellsPanel.MeasureOverride (System.Windows.Size) à System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) à System.Windows.UIElement.Measure (System.Windows.Size) à MS.Internal.Helper.MeasureElementWithSingleChild (.Windows.UIElement, System.Windows.Size) ® System.Windows.Controls.ItemsPresenter.MeasureOverride (System.Windows.Size) ® System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) ® System.Windows.UIElement.Мера (System.Windows.Size) à System.Windows.Controls.Control.MeasureOverride (System.Windows.Size) à System.Windows.Controls.Primitives.DataGridCellsPresenter.MeasureOverride (System.Windows.Size) à System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) à System.Windows.UIElement.Measure (System.Windows.Size) à System.Windows.Controls.Grid.MeasureCell (Int32, Boolean) à System.Windows.Controls.Grid.MeasureCellsGroup (Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef) à System.Windows.Controls.Grid.MeasureOverride (System.Windows.Size) à System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) à System.Windows.UIElement.Measure (System.Windows.Size) à System.Windows.Controls.Border.MeasureOverride (System.Windows.Size) àSystem.Windows.FrameworkElement.MeasureCore (System.Windows.Size) à System.Windows.UIElement.Measure (System.Windows.Size) à System.Windows.Controls.Control.MeasureOverride (System.Windows.Size) à System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) ® System.Windows.UIElement.Measure (System.Windows.Size) ® System.Windows.Controls.VirtualizingStackPanel.MeasureChild (System.Windows.Controls.Primitives.IItemContainerGenerator.Windows.Controls.Primitives.IContainItemStorage ByRef, System.Windows.Controls.Primitives.IContainItemStorage ByRef, System.Object ByRef, логический ByRef, двойной ByRef, двойной ByRef, логический ByRef, логический ByRef, System.Colject.ByRef, System.Collections.IList ByRef, Int32 ByRef, логический ByRef, логический ByRef, System.Windows.Size ByRef, System.Windows.Rect ByRef, System.Windows.Controls.VirtualizationCacheLength ByRef, System.Windows.Controls.VirtualizationCacheLengthUnit ByRef, Boolean ByRef, Double ByRef, System.Windows.Size ByRef, System.Windows.ByRef, System.Windows.Size ByRef, System.Windows.Size ByRef, System.Windows.Size ByRef, System.Windows.Size ByRef, System.Windows.Size ByRef, System.Windows.Size ByRef, логический ByRef, логический, логический, Boolean, Boolean, Boolean, Boolean ByRef, Boolean ByRef) à System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl (System.Windows.Size, System.Nullable 1<Double> ByRef,
System.Collections.Generic.List
1 ByRef, System.Nullable`1 ByRef, Boolele).Windows.Controls.VirtualizingStackPanel.MeasureOverride (System.Windows.Size) à System.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride (System.Windows.Size) à System.Windows.FrameworkElement.MeasureCore (System.Windows.Size) à System.Windows.UIElement.Measure (System.Windows.Size) à System.Windows.ContextLayoutManager.UpdateLayout () â System.Windows.ContextLayoutManager.UpdateLayoutCallback (System.Object),System.Object) à System.Windows.Media.MediaContext.Resize (System.Windows.Media.ICompositionTarget) à System.Windows.Interop.HwndTarget.OnResize () à System.Windows.Interop.HwndTarget.HandleMessage (MS.Interop.WindowMessage, IntPtr, IntPtr) ® System.Windows.Interop.HwndSource.HwndTargetFilterMessage (IntPtr, Int32, IntPtr, IntPtr, логическое значение ByRef) - MS.Win32.HwndWrapper.MS.Win32.HwndSubclass.DispatcherCallbackOperation (System.Object)System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate, System.Object, Int32) à System.Windows.Threading.ExceptionWrapper.TryCatchWhen (System.Object, System.Delegate, System.Object, Int32, System.Delegate) àSystem.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) MS.Win32.HwndSubclass.SubclassWndProc (IntPtr) Int32, Int32, Int32, Int321021 *