From 17fdde66d94155fc62a034fa6658995bef6fd6e5 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 22 Mar 2016 13:02:25 -0700 Subject: Initial import --- .../Bugzilla34072.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs') diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs new file mode 100644 index 00000000..d08b2f36 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs @@ -0,0 +1,54 @@ +using Xamarin.Forms.CustomAttributes; + +namespace Xamarin.Forms.Controls.TestCasesPages +{ + [Preserve (AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 34072, "Inconsistent Disabled Button behavior between Forms for Android & iOS")] + public class Bugzilla34072 : TestContentPage + { + Button _testButton; + Label _reproStepsLabel; + + protected override void Init () + { + _testButton = new Button () { + Text = "Enabled", + TextColor = Color.Yellow, + IsEnabled = true + }; + + var switchStateButton = new Button { + Text = "Switch Enabled State", + Command = new Command (SwitchState), + }; + + _reproStepsLabel = new Label () { + Text = "Tap the 'Switch Enabled State' button. The top button text should be grayed out when the button is Disabled. If the text remains the same color in both states, this is broken." + }; + + Content = new StackLayout { + Padding = 10, + HorizontalOptions = LayoutOptions.FillAndExpand, + VerticalOptions = LayoutOptions.FillAndExpand, + Orientation = StackOrientation.Vertical, + Children = { + _testButton, + switchStateButton, + _reproStepsLabel + } + }; + } + + public void SwitchState () + { + if (_testButton.IsEnabled) { + _testButton.IsEnabled = false; + _testButton.Text = "Disabled"; + return; + } + + _testButton.IsEnabled = true; + _testButton.Text = "Enabled"; + } + } +} \ No newline at end of file -- cgit v1.2.3