Browse Source

fix xaml transformer.

pull/3987/head
Dan Walmsley 6 years ago
parent
commit
f842c3290c
  1. 4
      src/Markup/Avalonia.Markup.Xaml/XamlIl/CompilerExtensions/Transformers/AvaloniaXamlIlResolveByNameMarkupExtensionReplacer.cs

4
src/Markup/Avalonia.Markup.Xaml/XamlIl/CompilerExtensions/Transformers/AvaloniaXamlIlResolveByNameMarkupExtensionReplacer.cs

@ -13,7 +13,9 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
public IXamlAstNode Transform(AstTransformationContext context, IXamlAstNode node)
{
if (!(node is XamlAstXamlPropertyValueNode propertyValueNode)) return node;
if (!(propertyValueNode.Property is XamlAstClrProperty clrProperty)) return node;
IEnumerable<IXamlCustomAttribute> attributes = propertyValueNode.Property.GetClrProperty().CustomAttributes;
if (propertyValueNode.Property is XamlAstClrProperty referenceNode &&

Loading…
Cancel
Save