簡體   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