diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/FormattedStringExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/FormattedStringExtensions.cs index 2eb096d9b251..b4f81b11761a 100644 --- a/src/Controls/src/Core/Platform/Windows/Extensions/FormattedStringExtensions.cs +++ b/src/Controls/src/Core/Platform/Windows/Extensions/FormattedStringExtensions.cs @@ -79,6 +79,7 @@ public static void UpdateInlines( Foreground = textColor?.ToPlatform(), }; + run.Foreground = textColor?.ToPlatform(); textBlock.TextHighlighters.Add(textHighlighter); } diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LabelHyperlinkUnderlineColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LabelHyperlinkUnderlineColor.png new file mode 100644 index 000000000000..508bfa7c8d0f Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LabelHyperlinkUnderlineColor.png differ diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml new file mode 100644 index 000000000000..d0a2a84c6a40 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml @@ -0,0 +1,22 @@ + + + + + + + \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml.cs new file mode 100644 index 000000000000..6d83a2358933 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue23488.xaml.cs @@ -0,0 +1,12 @@ +namespace Maui.Controls.Sample.Issues +{ + [XamlCompilation(XamlCompilationOptions.Compile)] + [Issue(IssueTracker.Github, 23488, "Span text-decoration is incorrect whereas the Label behaves properly", PlatformAffected.UWP)] + public partial class Issue23488 : ContentPage + { + public Issue23488() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23488.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23488.cs new file mode 100644 index 000000000000..4a9250ff83b1 --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23488.cs @@ -0,0 +1,25 @@ +#if !MACCATALYST +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues +{ + public class Issue23488 : _IssuesUITest + { + public Issue23488(TestDevice device): base(device) + { + } + + public override string Issue => "Span text-decoration is incorrect whereas the Label behaves properly"; + + [Test] + [Category(UITestCategories.Label)] + public void LabelHyperlinkUnderlineColor() + { + App.WaitForElement("WaitForLabelControl"); + VerifyScreenshot(); + } + } +} +#endif \ No newline at end of file diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/LabelHyperlinkUnderlineColor.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/LabelHyperlinkUnderlineColor.png new file mode 100644 index 000000000000..327671fccc7a Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/LabelHyperlinkUnderlineColor.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelHyperlinkUnderlineColor.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelHyperlinkUnderlineColor.png new file mode 100644 index 000000000000..e521c3c127c9 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/LabelHyperlinkUnderlineColor.png differ