summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs
new file mode 100644
index 00000000..7d925018
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs
@@ -0,0 +1,61 @@
+´╗┐using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2597, "Stepper control .IsEnabled doesn't work", PlatformAffected.Android)]
+ public class Issue2597 : ContentPage
+ {
+ Label _label;
+
+ public Issue2597()
+ {
+ Label header = new Label
+ {
+ Text = "Stepper",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Stepper stepper = new Stepper
+ {
+ Minimum = 0,
+ Maximum = 10,
+ Increment = 0.1,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ IsEnabled = false
+ };
+ stepper.ValueChanged += OnStepperValueChanged;
+
+ _label = new Label
+ {
+ Text = "Stepper value is 0",
+ Font = Font.SystemFontOfSize(NamedSize.Large),
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ // Accomodate iPhone status bar.
+ Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10,
+ 5);
+
+ // Build the page.
+ Content = new StackLayout
+ {
+ Children =
+ {
+ header,
+ stepper,
+ _label
+ }
+ };
+ }
+
+ void OnStepperValueChanged(object sender, ValueChangedEventArgs e)
+ {
+ _label.Text = string.Format("Stepper value is {0:F1}", e.NewValue);
+ }
+ }
+}
+