Try changing any .ico images to .png images setup on the ribbon controls. If that does not solve the problem, keep reading.
This issue caused me some headaches and turned out to be very simple to resolve (of course, once I knew how to resolve it.)
First of all, a little background. I was getting this error on a WPF application using .NET Framework 4.0, running on a Windows XP machine. The same application worked just fine in Windows 7.
When trying to run the application on the Windows XP box, I was not getting a “user-friendly” message, instead my WPF application was crashing right off the bat (as soon as I launched the executable.) By looking at the Event Viewer I was able to find the exception details as shown below, in the Exception Information section. That’s let’s friendly, so I went ahead and put any initialization code in a try-catch block and that gave me this:
Provide value on ‘System.Windows.Baml2006.TypeConverterMarkupExtension’ threw an exception. Made some progress at least.
I researched that error all over the place, and found out that that error can be caused for a number of reasons, primarily stating that there is a syntax error somewhere in the XAML.Great!!! some more progress.
Some of the problems that I found that may cause that error are:
<Border Margin=”1″ BorderBrush=”Black” BorderThickness=”" Width=”Auto”/>
Note the empty BorderThickness property. Putting a value should fix the problem.
<GradientStop Color="##FFCBCBCB" Offset="1" />
Note the double ## in the color property. Removing the extra # should fix the problem.
<Grid x:Name=”LayoutRoot” Width=”*”>
Note the * in the Width property. Either removing that property, or setting it to a number or Auto should fix the problem.
<CheckBox Height=”" IsChecked=”{Binding IsChecked, Mode=TwoWay}“ Width=”80″>
Note the empty Height property, setting a valid height property, or removing the property should fix the issue.
Any how, none of the issues above were my situation so I had to keep looking. Since the message “Provide value on System.Windows.Baml2006.TypeConverterMarkupExtension threw an exception” did not tell me much, I went ahead and updated my try-catch block displaying the InnerException error message, as well as the Stack Trace. The inner exception error message obtained was this:
“The image format is unrecognized.”
The rest of the story is history!!!
So in summary, try the methods above, as well as changing the image formats, if that fixes your problem (or not) please leave any comments on the area below. Thanks.
Regards,
Gerardo Melendrez
.NET Tips And Tricks
Exception Information from Event Viewer:
Error 1:
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
Stack:
at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
at System.Windows.Application.LoadComponent(System.Object, System.Uri)
at APT.XBridge.Forms.Aliases.InitializeComponent()
at APT.XBridge.Forms.Aliases..ctor(Boolean, System.String)
at APT.XBridge.MainWindow.btnAliases_Click(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Microsoft.Windows.Controls.Ribbon.RibbonButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at System.Windows.Application.Run()
at APT.XBridge.App.Main()
Error 2:
EventType clr20r3, P1 applicationname.exe, P2 1.0.13.11192, P3 4e1b78f5, P4 presentationframework, P5 4.0.0.0, P6 4ba1f8db, P7 a06, P8 46, P9 system.windows.markup.xamlparse, P10 NIL.

