Skip to content
Merged
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue19152.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue19152"
Title="Issue19152">
<ScrollView>
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<Entry Background="White" AutomationId="entry" x:Name="entry" TextColor="Blue" Text="Entry Text" ClearButtonVisibility="WhileEditing"/>
<Button AutomationId="button"
x:Name="button"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>
16 changes: 16 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue19152.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Maui.Controls.Sample.Issues
{
[XamlCompilation(XamlCompilationOptions.Compile)]
[Issue(IssueTracker.Github, 19152, "Windows | Entry ClearButton not taking color of text", PlatformAffected.UWP)]
public partial class Issue19152 : ContentPage
{
public Issue19152()
{
InitializeComponent();
}
private void OnCounterClicked(object sender, EventArgs e)
{
entry.Focus();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#if !MACCATALYST
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues
{
public class Issue19152 : _IssuesUITest
{
public Issue19152(TestDevice device): base(device)
{
}

public override string Issue => "Windows | Entry ClearButton not taking color of text";

[Test]
[Category(UITestCategories.Entry)]
public void EntryClearButtonColorShouldMatchTextColor()
{
App.WaitForElement("entry");
App.Tap("button");
VerifyScreenshot();
}
}
}
#endif

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/Core/src/Platform/Windows/TextBoxExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public static void UpdateTextColor(this TextBox textBox, ITextStyle textStyle)
"TextControlForegroundPointerOver",
"TextControlForegroundFocused",
"TextControlForegroundDisabled",
"TextControlButtonForeground",
"TextControlButtonForegroundPointerOver",
"TextControlButtonForegroundPressed"
};

public static void UpdateCharacterSpacing(this TextBox textBox, ITextStyle textStyle)
Expand Down