简体   繁体   中英

WPF Application Ribbon crash

I created a program in visual studio 2008 with multiple windows. One of the windows uses the windows ribbon control. Now the program works fine on my computer (windows XP) but when I want to run it on another computer fresh installed with .net 3.5 SP1 installed I can start the program but I get a crash when I open the window with the ribbon control. This is the error file I get when I do try catch:

System.Windows.Markup.XamlParseException: Exception has been thrown by the target of an invocation. Error at object 'System.Windows.Data.Binding'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 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() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Obje ct obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider) at System.Windows.Markup.BamlRecordReader.GetStaticExtensionValue(Int16 memberId) at System.Windows.Markup.BamlRecordReader.GetExtensionValue(IOptimizedMarkupExtension optimizedMarkupExtensionRecord, String propertyName) at System.Windows.Markup.TemplateBamlRecordReader.ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) --- End of inner exception stack trace --- at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectId s, Type objectType) at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.Markup.TemplateBamlRecordReader.ReadNonContentRecord(BamlRecord bamlRecord) at System.Windows.Markup.TemplateBamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord) at System.Windows.Markup.TemplateTreeBuilderBamlTranslator.ParseFragment() at System.Windows.Markup.TreeBuilder.Parse() at System.Windows.Markup.XamlTemplateSerializer.ConvertBamlToObject(BamlRecordReader reader, BamlRecord bamlRecord, ParserContext context) at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.Markup.BamlRecordReader.ReadE lement(Int64 startPosition, XamlObjectIds contextXamlObjectIds, Object dictionaryKey) at System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition, Object key) at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache) at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache) at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache) at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource) at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue() at System.Windows.Controls.Control.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System. Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) at System.Windows.StyleHelper.ApplyStyleOrTemplateValue(FrameworkObject fo, DependencyProperty dp) at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList 1& exclusionContainerDependents, FrugalStructList 1& oldContainerDependents, FrugalStructList`1& newContainerDependents) at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style) at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache) at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object n ewValue) at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce) at System.Windows.FrameworkElement.UpdateThemeStyleProperty() at System.Windows.FrameworkElement.OnInitialized(EventArgs e) at System.Windows.Controls.MenuItem.OnInitialized(EventArgs e) at System.Windows.FrameworkElement.TryFireInitialized() at System.Windows.FrameworkElement.EndInit() at System.Windows.Controls.ItemsControl.EndInit() at System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element) at System.Windows.Markup.BamlRecordReader.ReadElementEndRecord(Boolean fromNestedBamlRecordReader) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord) at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment() at System.Windows.Markup.TreeBuilder.Parse() at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at S ystem.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Waak.WeegschaalProgramma.WeegAuteurWindow.InitializeComponent() at Waak.WeegschaalProgramma.WeegAuteurWindow..ctor(WeegschaalProcessor weegschaalProcessor)

Anybody has seen this error before or has any tips to help me out? I already removed .net and completely reinstalled it.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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