I have a WPF assembly including a window. When opening the window in an WPF application, it works fine.
But when I use the assembly as a part of a plugin for a third-party-software, and I' trying to open the window, I got this exception:
XamlParseException "The method or operation is not implemented."
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId) at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId) at System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, XamlType parentType) at System.Windows.Baml2006.Baml2006Reader.Process_PropertyComplexStart() at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord() at System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record) at System.Windows.ResourceDictionary.CreateObject(KeyRecord key) at System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache) at System.Windows.ResourceDictionary.OnGettingValuePrivate(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.ResourceDictionary.get_Item(Object key) at BuildingEditor.Converter.EnumToResourceConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in C:\Temp\_temp\_merged\BuildingEditor\Converter\EnumToResourceConverter.cs:line 56 at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange) at System.Windows.Data.BindingExpression.Activate(Object item) at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt) at System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp) at System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp) at System.Windows.StyleHelper.GetInstanceValue(UncommonField`1 dataField, DependencyObject container, FrameworkElement feChild, FrameworkContentElement fceChild, Int32 childIndex, DependencyProperty dp, Int32 i, EffectiveValueEntry& entry) at System.Windows.FrameworkTemplate.ReceivePropertySet(Object targetObject, XamlMember member, Object value, DependencyObject templatedParent) at System.Windows.FrameworkTemplate.<>c__DisplayClass6.<LoadOptimizedTemplateContent>b__4(Object sender, XamlSetValueEventArgs setArgs) at System.Xaml.XamlObjectWriter.OnSetValue(Object eventSender, XamlMember member, Object value) at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent) at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.WriteEndObject() at System.Xaml.XamlWriter.WriteNode(XamlReader reader) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
The inner exception is a NotImplementedException without any information about what happens there.
(It seems that when opening the window, it tries to load a ResourceDictionary from a XAML file containing some controls. Seems to me that resolving the namespace of the controls is the cause of the problems, but I don't know why it works in a WPF application but not as part of a plugin. All needed assemblies and namespaces are included or referenced by the assembly).
Can you help me finding the cause of this exception?
Best regards,
Christian