繁体   English   中英

WPF应用程序功能区崩溃

[英]WPF Application Ribbon crash

我在visual studio 2008中创建了一个带有多个窗口的程序。 其中一个窗口使用Windows功能区控件。 现在程序在我的计算机上工作正常(Windows XP),但是当我想在安装了.net 3.5 SP1的新计算机上运行它时,我可以启动程序,但是当我用功能区控件打开窗口时,我遇到了崩溃。 这是我尝试catch时得到的错误文件:

System.Windows.Markup.XamlParseException:调用目标抛出了异常。 对象'System.Windows.Data.Binding'出错。 ---> System.Reflection.TargetInvocationException:调用目标抛出了异常。 ---> System.ComponentModel.Win32Exception:HRESULT_FROM_WIN32(ERROR_NOT_FOUND)at Standard.HRESULT.ThrowIfFailed(String message)at Standard.NativeMethods.GetCurrentThemeName(String&themeFileName,String&color,String&size)at Microsoft.Windows.Shell.SystemParameters2._InitializeThemeInfo ()at Microsoft.Windows.Shell.SystemParameters2..ctor()at Microsoft.Windows.Shell.SystemParameters2.get_Current()---内部异常堆栈跟踪的结束---在System.RuntimeMethodHandle._InvokeMethodFast(Object target,Object) System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags)中的System.RuntimeMethodHandle.InvokeMethodFast(Object target,Object []参数,Signature sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner)中的[] arguments,SignatureStruct&sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner) System.Reflection.RuntimeMethodInfo.Invoke(Obje)中的invokeAttr,Binder binder,Object []参数,CultureInfo文化,布尔skipVisibilityChecks) ct obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)
System.Swindows.Markup上的System.Reflection.RuntimePropertyInfo.GetValue(Object obj,Object [] index)中的System.Reflection.RuntimePropertyInfo.GetValue(Object obj,BinderFlags invokeAttr,Binder binder,Object [] index,CultureInfo culture)。 StaticExtension.ProvideValue(的IServiceProvider的ServiceProvider)在System.Windows.Markup.BamlRecordReader.GetStaticExtensionValue(Int16的MEMBERID)在System.Windows.Markup.BamlRecordReader.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord,字符串propertyName的)在System.Windows.Markup.TemplateBamlRecordReader.ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord)在System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)---内部异常堆栈跟踪结束---在System.Windows.Markup.XamlParseException.ThrowException(String message,Exception innerException,Int32 lineNumber,Int32 linePosition) ,Uri baseUri,XamlObjectIds currentXamlObjectIds,XamlObjectIds contextXamlObjectId s,在System.Windows上的System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)处的System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext,Int32 lineNumber,Int32 linePosition,String message,Exception innerException)中键入objectType。位于System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment()的System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)的System.Windows.Markup.TemplateBamlRecordReader.ReadRecord(BamlRecord bamlRecord)中的Markup.TemplateBamlRecordReader.ReadNonContentRecord(BamlRecord bamlRecord)在System.Windows的System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)的System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader reader,BamlRecord bamlRecord,ParserContext context)中的System.Windows.Markup.TreeBuilder.Parse()。 System.Windows.Markup.BamlRecordReader.ReadE上的Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) System.Windows.ResourceDictionary的System.Windows.ResourceDictionary.RealizeDeferContent(Object key,Object&value,Boolean&canCache)上的System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition,Object key)中的lement(Int64 startPosition,XamlObjectIds contextXamlObjectIds,Object dictionaryKey) System.Windows上的System.Windows.DependencyPropertyChangedEventArgs.get_NewValue()处的System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource)处的System.Windows.ResourceDictionary.GetValue(Object key,Boolean&canCache)中的.GetValueWithoutLock(Object key,Boolean&canCache) .Controls.Control.OnTemplateChanged(DependencyObject的d,DependencyPropertyChangedEventArgs e)上System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)上System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)上System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)在系统。 System.Windows.StyleHelper.InvalidateContainerDependents的System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject fo,DependencyProperty dp)中的Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex,DependencyProperty dp,PropertyMetadata metadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,Boolean coerceWithDeferredReference,OperationType operationType) (DependencyObject容器,FrugalStructList 1& exclusionContainerDependents, FrugalStructList 1&oldContainerDependents,FrugalStructList`1&newContainerDependents)在System.Windows.StyleHelper.UpdateThemeStyleCache的System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe,FrameworkContentElement fce,Style oldThemeStyle,Style newThemeStyle,Style style)中( System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d,Object oldValue,Object n)中的FrameworkElement fe,FrameworkContentElement fce,Style oldThemeStyle,Style newThemeStyle,Style&themeStyleCache) ewValue)位于System.Windows.Findwork.lement.En.OnInitialized的System.Windows.FrameworkElement.OnInitialized(EventArgs e)中System.Windows.FrameworkElement.UpdateThemeStyleProperty()的System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe,FrameworkContentElement fce)( EventArgs e)System.Windows.FrameworkElement.FetworkElement.EndInit()中的System.Windows.FrameworkElement.TryFireInitialized()位于System.Windows.Markup.BamlRecordReader.ElementEndInit(Object&element)处的System.Windows.Controls.ItemsControl.EndInit()处系统.Windows.Markup.BamlRecordReader.ReadElementEndRecord(Boolean fromNestedBamlRecordReader)在System.Windows.Markup.Markup.TreeBuilderBamlTranslator的System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)的System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)中。在S的System.Windows.Markup.Markup.TreeBuilder.Parse()中的ParseFragment(),在S的System.Windows.Markup.XamlReader.LoadBaml(Stream stream,ParserContext parserContext,Object parent,Boolean closeStream) 在Waak.WeegschaalProgramma.WeegAuteurWindow..ctor(WeegschaalProcessor weegschaalProcessor)的Waak.WeegschaalProgramma.WeegAuteurWindow.InitializeComponent()中的ystem.Windows.Application.LoadComponent(对象组件,Uri resourceLocator)

有没有人之前看过这个错误或有任何提示可以帮助我? 我已经删除了.net并完全重新安装了它。

你的异常与我的异常有点不同(XamlParseException提供'System.Windows.Markup.StaticExtension'上的值引发异常。)但我想你应该看看我的答案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM