зеркало из https://github.com/DeGsoft/maui-linux.git
Родитель
f8171b4ad4
Коммит
545ce131db
|
@ -0,0 +1,22 @@
|
|||
using Xamarin.Forms.CustomAttributes;
|
||||
using Xamarin.Forms.Internals;
|
||||
|
||||
namespace Xamarin.Forms.Controls.Issues
|
||||
{
|
||||
[Preserve(AllMembers = true)]
|
||||
[Issue(IssueTracker.Github, 8148, "WPF Entry initial TextColor ignored when typing", PlatformAffected.WPF)]
|
||||
public class Issue8148 : TestContentPage
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
Content = new StackLayout()
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new Label() { Text = "Start typing - text should be red immediately as you typing" },
|
||||
new Entry { TextColor = Color.Red },
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Issue6945.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue7313.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue5500.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue8148.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue8008.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue6640.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue7556.cs" />
|
||||
|
|
|
@ -143,8 +143,6 @@ namespace Xamarin.Forms.Platform.WPF
|
|||
|
||||
Entry entry = Element;
|
||||
if (entry != null)
|
||||
{
|
||||
if (!IsNullOrEmpty(entry.Text))
|
||||
{
|
||||
if (!entry.TextColor.IsDefault)
|
||||
Control.Foreground = entry.TextColor.ToBrush();
|
||||
|
@ -155,7 +153,6 @@ namespace Xamarin.Forms.Platform.WPF
|
|||
// so the colors change immediately and remain changed when the control gets focus
|
||||
Control.OnApplyTemplate();
|
||||
}
|
||||
}
|
||||
else
|
||||
Control.Foreground = (Brush)WControl.ForegroundProperty.GetMetadata(typeof(FormsTextBox)).DefaultValue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче