Ran into this after upgrading, for other reasons, from 1.9.0 to 2.0.0.
I had, previously, a property grid style that set up type-based custom editors for several different data types, using the TargetType property of the EditorDefinition. This obviously didn't work under 2.0.0, inasmuch as EditorDefinition is obsoleted, so, per the warning messages given, I rewrote the style using EditorTemplateDefinition and TargetProperties, thus:
https://gist.github.com/cerebrate/6695088
Here's the problem. If I comment out the upper two EditorTemplateDefinitions, those using the {arkane:Nullable} markup extension, the remainder of the style (the two definitions using the {x:Type} markup extension) works. If I leave them in, as soon as the window containing the property grid is shown, the application crashes with a XamlParseException, could not convert System.RuntimeType to IList.
The {arkane:Nullable} is a simple but pretty standard extension to TypeExtension to provide the ability to use nullable types in XAML:
https://gist.github.com/cerebrate/6695095
But more to the point, it's a simple subclass of TypeExtension and worked just fine when applied to TargetType in EditorDefinition, and hasn't been changed since.
Any ideas as to what part of the change broke this and how to fix it, on either end? Or, alternatively, is there any way to associate a custom editor with a nullable type without using such a markup extension?
Thanks,
Alistair
I had, previously, a property grid style that set up type-based custom editors for several different data types, using the TargetType property of the EditorDefinition. This obviously didn't work under 2.0.0, inasmuch as EditorDefinition is obsoleted, so, per the warning messages given, I rewrote the style using EditorTemplateDefinition and TargetProperties, thus:
https://gist.github.com/cerebrate/6695088
Here's the problem. If I comment out the upper two EditorTemplateDefinitions, those using the {arkane:Nullable} markup extension, the remainder of the style (the two definitions using the {x:Type} markup extension) works. If I leave them in, as soon as the window containing the property grid is shown, the application crashes with a XamlParseException, could not convert System.RuntimeType to IList.
The {arkane:Nullable} is a simple but pretty standard extension to TypeExtension to provide the ability to use nullable types in XAML:
https://gist.github.com/cerebrate/6695095
But more to the point, it's a simple subclass of TypeExtension and worked just fine when applied to TargetType in EditorDefinition, and hasn't been changed since.
Any ideas as to what part of the change broke this and how to fix it, on either end? Or, alternatively, is there any way to associate a custom editor with a nullable type without using such a markup extension?
Thanks,
Alistair