Browse Source

Merge pull request #653 from jogibear9988/master

Fix that Images don't work
pull/661/head
Andreas Weizel 11 years ago
parent
commit
a21da76a0c
  1. 21
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObjectServiceProvider.cs
  2. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs

21
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObjectServiceProvider.cs

@ -18,7 +18,9 @@ @@ -18,7 +18,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Markup;
using System.Xaml;
@ -29,7 +31,7 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -29,7 +31,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
/// A service provider that provides the IProvideValueTarget and IXamlTypeResolver services.
/// No other services (e.g. from the document's service provider) are offered.
/// </summary>
public class XamlObjectServiceProvider : IServiceProvider, IXamlNameResolver, IProvideValueTarget, IXamlSchemaContextProvider, IAmbientProvider
public class XamlObjectServiceProvider : IServiceProvider, IXamlNameResolver, IProvideValueTarget, IXamlSchemaContextProvider, IAmbientProvider, IUriContext
{
/// <summary>
/// Creates a new XamlObjectServiceProvider instance.
@ -75,6 +77,10 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -75,6 +77,10 @@ namespace ICSharpCode.WpfDesign.XamlDom
{
return this;
}
if (serviceType == typeof(IUriContext))
{
return this;
}
return null;
}
@ -119,6 +125,19 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -119,6 +125,19 @@ namespace ICSharpCode.WpfDesign.XamlDom
#endregion
#region IUriContext implementation
public virtual Uri BaseUri {
get {
return new Uri("pack://application:,,,/");
}
set {
}
}
#endregion
#region IXamlSchemaContextProvider Members
private XamlSchemaContext iCsharpXamlSchemaContext;

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs

@ -243,8 +243,8 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -243,8 +243,8 @@ namespace ICSharpCode.WpfDesign.XamlDom
((FrameworkElement)this.ParentObject.Instance).Height = (double)ValueOnInstance;
}
}
catch {
Debug.WriteLine("UpdateValueOnInstance() failed");
catch (Exception ex) {
Debug.WriteLine("UpdateValueOnInstance() failed - Exception:" + ex.Message);
}
}
}

Loading…
Cancel
Save