summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs
diff options
context:
space:
mode:
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