summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs54
1 files changed, 54 insertions, 0 deletions
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