diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/Designer/ModelTestHelper.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/Designer/ModelTestHelper.cs index 78f921e9fe..da5ef4f376 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/Designer/ModelTestHelper.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/Designer/ModelTestHelper.cs @@ -30,7 +30,7 @@ namespace ICSharpCode.WpfDesign.Tests.Designer protected XamlDesignContext CreateContext(string xaml) { log = new StringBuilder(); - XamlDesignContext context = new XamlDesignContext(new XmlTextReader(new StringReader(xaml)), null); + XamlDesignContext context = new XamlDesignContext(new XmlTextReader(new StringReader(xaml)), new XamlLoadSettings()); /*context.Services.Component.ComponentRegistered += delegate(object sender, DesignItemEventArgs e) { log.AppendLine("Register " + ItemIdentity(e.Item)); }; diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs index 6fad201241..e4bfbfac0e 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Globalization; using System.Diagnostics; using System.IO; using System.Reflection; @@ -158,7 +159,10 @@ namespace ICSharpCode.WpfDesign.XamlDom object instance; if (initializeFromTextValueInsteadOfConstructor != null) { - instance = TypeDescriptor.GetConverter(elementType).ConvertFromString(initializeFromTextValueInsteadOfConstructor.Text); + instance = TypeDescriptor.GetConverter(elementType).ConvertFromString( + document.GetTypeDescriptorContext(), + CultureInfo.InvariantCulture, + initializeFromTextValueInsteadOfConstructor.Text); } else { instance = settings.CreateInstanceCallback(elementType, emptyObjectArray); }