XamlParseException: “对类型“System.Windows.Window”的构造函数执行符合指定的绑定约束的调用时引发了异常。”,行号为“4”,行位置为“13”。 --LineNumber: 4 --LinePosition: 13 --BaseUri: pack://application:,,,/ 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.Load(XamlReader xamlReader, Boolean skipJournaledProperties, Uri baseUri) 在 System.Windows.Markup.XamlReader.Load(XamlReader xamlReader, ParserContext parserContext) 在 System.Windows.Markup.XamlReader.Load(XmlReader reader, ParserContext parserContext, XamlParseMode parseMode, Boolean useRestrictiveXamlReader, List`1 safeTypes) 在 System.Windows.Markup.XamlReader.Load(XmlReader reader) 在 DynamicClass.WpfViewer.Show(Object rootObject) 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart() InvalidOperationException: 调用线程无法访问此对象,因为另一个线程拥有该对象。 StackTrace: 在 System.Windows.Threading.Dispatcher.VerifyAccess() 在 System.Windows.Freezable.System.Windows.ISealable.get_IsSealed() 在 System.Windows.StyleHelper.SealIfSealable(Object value) 在 System.Windows.StyleHelper.GetChildValueHelper(UncommonField`1 dataField, ItemStructList`1& valueLookupList, DependencyProperty dp, DependencyObject container, FrameworkObject child, Int32 childIndex, Boolean styleLookup, EffectiveValueEntry& entry, ValueLookupType& sourceType, FrameworkElementFactory templateRoot) 在 System.Windows.StyleHelper.GetChildValue(UncommonField`1 dataField, DependencyObject container, Int32 childIndex, FrameworkObject child, DependencyProperty dp, FrugalStructList`1& childRecordFromChildIndex, EffectiveValueEntry& entry, ValueLookupType& sourceType, FrameworkElementFactory templateRoot) 在 System.Windows.StyleHelper.GetValueFromStyleOrTemplate(FrameworkObject fo, DependencyProperty dp, EffectiveValueEntry& entry) 在 System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject fo, DependencyProperty dp) 在 System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents) 在 System.Windows.StyleHelper.DoStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle) 在 System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache) 在 System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 在 System.Windows.FrameworkElement..ctor() 在 System.Windows.Controls.Control..ctor() 在 System.Windows.Window..ctor() 在 System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlType_Window>b__1137_0() 在 System.Windows.Baml2006.WpfKnownTypeInvoker.CreateInstance(Object[] arguments) 在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)