Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class TextColorToGenerator : IIncrementalGenerator
const string iAnimatableInterface = "Microsoft.Maui.Controls.IAnimatable";
const string mauiControlsAssembly = "Microsoft.Maui.Controls";
const string mauiColorFullName = "global::Microsoft.Maui.Graphics.Color";
const string mauiColorsFullName = "global::Microsoft.Maui.Graphics.Colors";

public void Initialize(IncrementalGeneratorInitializationContext context)
{
Expand Down Expand Up @@ -152,7 +153,7 @@ namespace {{textStyleClassMetadata.Namespace}};

//Although TextColor is defined as not-nullable, it CAN be null
//If null => set it to Transparent as Animation will crash on null BackgroundColor
element.TextColor ??= Colors.Transparent;
element.TextColor ??= {{mauiColorsFullName}}.Transparent;

var animationCompletionSource = new TaskCompletionSource<bool>();

Expand Down