2
Vote

[AvalonDock 2.0.1363] Exceptions when loading layout

description

When I call XmlLayoutSerializer.Deserialize to load a stored layout I get many exceptions like the following on my debug output:
 
System.Windows.Data Error: 23 : Cannot convert '<null>' from type '<null>' to type 'System.Windows.Media.ImageSource' for 'en-US' culture with default conversions; consider using Converter property of Binding. NotSupportedException:'System.NotSupportedException: ImageSourceConverter kann nicht von (NULL) konvertieren.
bei System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
bei System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
bei MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)'
 
I didn't have this problem with version 2.0.1045.
 
Maybe you should define a converter like in the following post on stackoverflow:
http://stackoverflow.com/questions/5399601/imagesourceconverter-error-for-source-null

comments

adospace wrote Aug 16, 2012 at 9:30 PM

I think the problem is related to the property of your view model, do you have a property of type Uri that returns the icon of the pane? if so switch to the ImageSource,

Ado

MichaelTR wrote Aug 17, 2012 at 6:59 AM

That helped, thank you.
You are doing a great job.