From d6bd1c3180fc996b86dd59a9ccf0de29958419d8 Mon Sep 17 00:00:00 2001 From: jkuehner Date: Mon, 29 Jul 2013 18:34:44 +0200 Subject: [PATCH] We need the System.Xaml Assembly also in the WpfTypefinder because othrwise Types like NullExtension ({x:Null}) are not found because they life in this Assembly! --- .../WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs index d74bab3520..87092af3f7 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Windows.Markup; +using System.Xaml; +using XamlReader = System.Windows.Markup.XamlReader; namespace ICSharpCode.WpfDesign.XamlDom { @@ -120,7 +122,7 @@ namespace ICSharpCode.WpfDesign.XamlDom XamlNamespace ns; if (namespaces.TryGetValue(xmlNamespace, out ns)) { - return ns.XmlNamespacePrefix; + return ns.XmlNamespacePrefix; } else { return null; } @@ -204,7 +206,7 @@ namespace ICSharpCode.WpfDesign.XamlDom var ns = namespaces[XamlConstants.DesignTimeNamespace] = new XamlNamespace("d", XamlConstants.DesignTimeNamespace); AddMappingToNamespace(ns, new AssemblyNamespaceMapping(typeof(DesignTimeProperties).Assembly, typeof(DesignTimeProperties).Namespace)); ns = namespaces[XamlConstants.MarkupCompatibilityNamespace] = new XamlNamespace("mc", XamlConstants.MarkupCompatibilityNamespace); - AddMappingToNamespace(ns, new AssemblyNamespaceMapping(typeof(MarkupCompatibilityProperties).Assembly, typeof(MarkupCompatibilityProperties).Namespace)); + AddMappingToNamespace(ns, new AssemblyNamespaceMapping(typeof(MarkupCompatibilityProperties).Assembly, typeof(MarkupCompatibilityProperties).Namespace)); } /// @@ -268,6 +270,7 @@ namespace ICSharpCode.WpfDesign.XamlDom Instance.RegisterAssembly(typeof(MarkupExtension).Assembly); // WindowsBase Instance.RegisterAssembly(typeof(IAddChild).Assembly); // PresentationCore Instance.RegisterAssembly(typeof(XamlReader).Assembly); // PresentationFramework + Instance.RegisterAssembly(typeof(XamlType).Assembly); // System.Xaml } } }