Browse Source

fix: Use global:: for Type Names (#14)

pull/10407/head 0.1.4
Artyom V. Gorchakov 6 years ago
committed by GitHub
parent
commit
e1a87d6474
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/XamlNameReferenceGenerator/NameReferenceGenerator.cs

6
src/XamlNameReferenceGenerator/NameReferenceGenerator.cs

@ -109,8 +109,8 @@ internal sealed class GenerateTypedNameReferencesAttribute : Attribute { }
var namedControls = nameResolver
.ResolveNames(xamlFile.GetText()!.ToString())
.Select(info => " " +
$"internal {info.TypeName} {info.Name} => " +
$"this.FindControl<{info.TypeName}>(\"{info.Name}\");");
$"internal global::{info.TypeName} {info.Name} => " +
$"this.FindControl<global::{info.TypeName}>(\"{info.Name}\");");
return $@"// <auto-generated />
using Avalonia.Controls;
@ -182,4 +182,4 @@ namespace {nameSpace}
return symbols;
}
}
}
}

Loading…
Cancel
Save