diff --git a/src/CommunityToolkit.Maui.SourceGenerators/Generators/TextColorToGenerator.cs b/src/CommunityToolkit.Maui.SourceGenerators/Generators/TextColorToGenerator.cs index 751b4c934..47773f94d 100644 --- a/src/CommunityToolkit.Maui.SourceGenerators/Generators/TextColorToGenerator.cs +++ b/src/CommunityToolkit.Maui.SourceGenerators/Generators/TextColorToGenerator.cs @@ -24,6 +24,7 @@ class TextColorToGenerator : IIncrementalGenerator const string iTextStyleInterface = "Microsoft.Maui.ITextStyle"; const string iAnimatableInterface = "Microsoft.Maui.Controls.IAnimatable"; const string mauiControlsAssembly = "Microsoft.Maui.Controls"; + const string mauiColorFullName = "global::Microsoft.Maui.Graphics.Color"; public void Initialize(IncrementalGeneratorInitializationContext context) { @@ -115,7 +116,7 @@ namespace {{textStyleClassMetadata.Namespace}}; /// The duration, in milliseconds, of the animation /// The easing function to be used in the animation /// Value indicating if the animation completed successfully or not - public static Task TextColorTo{{textStyleClassMetadata.GenericArguments}}(this {{textStyleClassMetadata.Namespace}}.{{textStyleClassMetadata.ClassName}}{{textStyleClassMetadata.GenericArguments}} element, Color color, uint rate = 16u, uint length = 250u, Easing? easing = null) + public static Task TextColorTo{{textStyleClassMetadata.GenericArguments}}(this global::{{textStyleClassMetadata.Namespace}}.{{textStyleClassMetadata.ClassName}}{{textStyleClassMetadata.GenericArguments}} element, {{mauiColorFullName}} color, uint rate = 16u, uint length = 250u, Easing? easing = null) {{textStyleClassMetadata.GenericConstraints}} { ArgumentNullException.ThrowIfNull(element);