Browse Source

Fix #2610: Explicitly qualify members in TemplateBindings.

At a later point, we can add some more logic that tries to infer the target type of the binding and applies simplification accordingly.
pull/2679/head
Siegfried Pammer 3 years ago
parent
commit
b0ec01de80
  1. 2
      ILSpy.BamlDecompiler.Tests/Cases/AvalonDockCommon.xaml
  2. 2
      ILSpy.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs

2
ILSpy.BamlDecompiler.Tests/Cases/AvalonDockCommon.xaml

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ad:Resizer}">
<Border Background="{TemplateBinding Background}" />
<Border Background="{TemplateBinding Control.Background}" />
</ControlTemplate>
</Setter.Value>
</Setter>

2
ILSpy.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs

@ -59,7 +59,7 @@ namespace ILSpy.BamlDecompiler.Handlers @@ -59,7 +59,7 @@ namespace ILSpy.BamlDecompiler.Handlers
var value = ctx.ResolveProperty(record.ValueId);
value.DeclaringType.ResolveNamespace(parent.Xaml, ctx);
var xName = value.ToXName(ctx, parent.Xaml, false);
var xName = value.ToXName(ctx, parent.Xaml, true);
ext.Initializer = new object[] { ctx.ToString(parent.Xaml, xName) };
}

Loading…
Cancel
Save