forked from xamarin/Xamarin.Forms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iOS: Color of Editor Placeholder is different than Entry (xamarin#5259)
fixes xamarin#5252
- Loading branch information
1 parent
7609412
commit 557d7c2
Showing
3 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue5252.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Linq; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 5252, "iOS: The Editor and Entry placeholder default color should be the same", PlatformAffected.iOS)] | ||
|
||
class Issue5252 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var sl = new StackLayout(); | ||
sl.Children.Add(new Label() | ||
{ | ||
Text = "iOS: The Editor and Entry placeholder default color should be the same for consistency" | ||
}); | ||
|
||
var entry = new Entry() | ||
{ | ||
Placeholder = "Entry placeholder", | ||
}; | ||
sl.Children.Add(entry); | ||
|
||
var editor = new Editor() | ||
{ | ||
Placeholder = "Editor placeholder", | ||
}; | ||
sl.Children.Add(editor); | ||
|
||
sl.Children.Add(new Button() | ||
{ | ||
Text = "Toggle placeholder color", | ||
Command = new Command(() => | ||
{ | ||
entry.PlaceholderColor = entry.PlaceholderColor.IsDefault ? Color.Red : (Color)Entry.PlaceholderColorProperty.DefaultValue; | ||
editor.PlaceholderColor = editor.PlaceholderColor.IsDefault ? Color.Red : (Color)Editor.PlaceholderColorProperty.DefaultValue; | ||
}) | ||
}); | ||
|
||
|
||
Content = new ScrollView() | ||
{ | ||
Content = sl | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters