This repository has been archived by the owner on May 1, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Editor focused background color behavior consistent with Entry o…
…n Windows
- Loading branch information
Showing
4 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44584.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,44 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
namespace Xamarin.Forms.Controls | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Bugzilla, 44584, | ||
"UWP - Editor: changing the background color will only take effect after the entry gained focus")] | ||
public class Bugzilla44584 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var instructions = new Label | ||
{ | ||
Text = @" | ||
Tap the first button once to turn the Entry background color to Green. Tap the Entry to focus it; the background should remain green; if it does not, the test has failed. | ||
Tap the second button once to turn the Editor background color to Green. Tap the Editor to focus it; the background should remain green; if it does not, the test has failed." | ||
}; | ||
|
||
var entryButton = new Button { Text = "Toggle Entry Background (Green/Default)" }; | ||
var entry = new Entry(); | ||
|
||
entryButton.Clicked += | ||
(sender, args) => { entry.BackgroundColor = entry.BackgroundColor != Color.Green ? Color.Green : Color.Default; }; | ||
|
||
var editorButton = new Button { Text = "Toggle Editor Background (Green/Default)" }; | ||
var editor = new Editor() | ||
{ | ||
HeightRequest = 80 | ||
}; | ||
|
||
editorButton.Clicked += | ||
(sender, args) => { editor.BackgroundColor = editor.BackgroundColor != Color.Green ? Color.Green : Color.Default; }; | ||
|
||
var layout = new StackLayout | ||
{ | ||
VerticalOptions = LayoutOptions.Center, | ||
Children = { instructions, entryButton, entry, editorButton, editor } | ||
}; | ||
|
||
Content = layout; | ||
} | ||
} | ||
} |
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
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