XamlParseException: 初始化“System.Windows.Controls.DataGrid”时引发了异常。 --LineNumber: 0 --LinePosition: 0 --BaseUri: pack://application:,,,/Quicker;component/modules/tables/tablemanagewindow.xaml StackTrace: 在 System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) 在 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) 在 System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) 在 System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) 在 Quicker.Modules.Tables.TableManageWindow.InitializeComponent() 在 Quicker.Modules.Tables.TableManageWindow..ctor(DataTable table, TableDef tableDef, Boolean isReadOnly, GridSelectionMode selectionMode, ActionExecuteContext actionExecuteContext) 在 Quicker.Actions.XActions.BuildinRunners.TableOperationStep.<>c__DisplayClass91_0.aIJVYX9hym7BUDonkDDB.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) InvalidOperationException: 只能根据带有基类型“DataGrid”的目标类型的 Style。 StackTrace: 在 System.Windows.Style.Seal() 在 System.Windows.StyleHelper.SealIfSealable(Object value) 在 System.Windows.ResourceDictionary.SealValue(Object value) 在 System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache) 在 System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache) 在 System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache) 在 System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache) 在 System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source) 在 System.Windows.FrameworkElement.FindImplicitStyleResource(FrameworkElement fe, Object resourceKey, Object& source) 在 System.Windows.FrameworkElement.GetRawValue(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& entry) 在 System.Windows.FrameworkElement.EvaluateBaseValueCore(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& newEntry) 在 System.Windows.DependencyObject.EvaluateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, OperationType operationType) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue) 在 System.Windows.FrameworkElement.UpdateStyleProperty() 在 System.Windows.FrameworkElement.OnInitialized(EventArgs e) 在 System.Windows.Controls.Primitives.Selector.OnInitialized(EventArgs e) 在 System.Windows.FrameworkElement.TryFireInitialized() 在 System.Windows.Controls.ItemsControl.EndInit() 在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)