Skip to content

Instantly share code, notes, and snippets.

@jacksonh
Created August 13, 2010 20:15
Show Gist options
  • Save jacksonh/523490 to your computer and use it in GitHub Desktop.
Save jacksonh/523490 to your computer and use it in GitHub Desktop.
diff --git a/class/System.Windows/Mono/Value.cs b/class/System.Windows/Mono/Value.cs
index 6afea49..9dede04 100644
--- a/class/System.Windows/Mono/Value.cs
+++ b/class/System.Windows/Mono/Value.cs
@@ -333,7 +333,7 @@ namespace Mono {
return new PropertyPath (null);
if (propertypath->property != IntPtr.Zero)
return null;
- return new PropertyPath (Marshal.PtrToStringAuto (propertypath->pathString));
+ return new PropertyPath (Marshal.PtrToStringAuto (propertypath->pathString), Marshal.PtrToStringAuto (propertypath->expandedPathString));
}
case Kind.POINT: {
@@ -670,11 +670,11 @@ namespace Mono {
UnmanagedPropertyPath *upp = (UnmanagedPropertyPath *) value.u.p;
upp->property = propertypath.NativeDP;
- if (upp->property == IntPtr.Zero)
+ if (upp->property == IntPtr.Zero) {
upp->pathString = StringToIntPtr (propertypath.Path);
- else
+ upp->expandedPathString = StringToIntPtr (propertypath.ExpandedPath);
+ } else
upp->pathString = IntPtr.Zero;
- upp->expandedPathString = IntPtr.Zero;
}
else if (v is Uri) {
Uri uri = (Uri) v;
diff --git a/class/System.Windows/System.Windows/PropertyPath.cs b/class/System.Windows/System.Windows/PropertyPath.cs
index aac8576..a93d6de 100644
--- a/class/System.Windows/System.Windows/PropertyPath.cs
+++ b/class/System.Windows/System.Windows/PropertyPath.cs
@@ -34,6 +34,8 @@ namespace System.Windows
public sealed class PropertyPath
{
private string path;
+ private string expanded_path;
+
private DependencyProperty property;
public PropertyPath (string path, params object [] pathParameters)
@@ -46,6 +48,12 @@ namespace System.Windows
this.path = path;
}
+ internal PropertyPath (string path, string expanded_path)
+ {
+ this.path = path;
+ this.expanded_path = expanded_path;
+ }
+
public PropertyPath (object parameter)
{
property = parameter as DependencyProperty;
@@ -58,5 +66,8 @@ namespace System.Windows
public string Path {
get { return property == null ? path : "(0)"; }
}
+ internal string ExpandedPath {
+ get { return property == null ? expanded_path : "(0)"; }
+ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment