Bug 21317 - Stepper control .IsEnabled doesn't work on Android
Summary: Stepper control .IsEnabled doesn't work on Android
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 1.1.1
Hardware: PC Windows
: Normal normal
Target Milestone: 1.4.0
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-14 15:27 UTC by Jon Douglas [MSFT]
Modified: 2015-03-03 14:19 UTC (History)
10 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Jon Douglas [MSFT] 2014-07-14 15:27:56 UTC
Reproduced by the following page:

    class StepperDemoPage : ContentPage
    {
        Label label;

        public StepperDemoPage()
        {
            Label header = new Label
            {
                Text = "Stepper",
                Font = Font.BoldSystemFontOfSize(50),
                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.
            this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);

            // Build the page.
            this.Content = new StackLayout
            {
                Children =
                {
                    header,
                    stepper,
                    label
                }
            };
        }

        void OnStepperValueChanged(object sender, ValueChangedEventArgs e)
        {
            label.Text = String.Format("Stepper value is {0:F1}", e.NewValue);
        }
    }

Works fine on iOS/WinPhone, but on Android it is still enabled.
Comment 1 michael@zpf.fr 2014-08-10 07:09:55 UTC
I've the same problem (stepper reacting despite IsEnabled = false) on Windows Phone and Android (iOS not tested) with version 1.2.2.0.
Comment 2 Tajinder Singh 2014-08-11 10:50:44 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps below : 

1. Create a Xamarin.Forms Application.
2. Apply the given code on the application.
3. Run sucessfully.

After running the application I  have observed that "IsEnabled" does't works fine on android while this is working fine for iOS. I have checked this issue on Forms version 1.1.1.0 and 1.2.2.0 and getting same behavior with both Forms versions.

Screencast: http://www.screencast.com/t/g1IxgHVWmB

Environment info:
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.3.47.0 (0b2a123923812a88ed3091909478dbe9e0111f00)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android
Comment 3 Brad R 2014-12-19 15:32:10 UTC
This is still an issue it appears.  Trying to set a binding for the steppers' IsEnabledProperty seems to be broken as well.
Comment 4 Jason Smith [MSFT] 2015-02-24 13:37:12 UTC
Should be fixed in 1.4.0-pre1
Comment 5 Parmendra Kumar 2015-03-03 06:56:19 UTC
I have checked this issue with Xamarin.Forms version 1.4.0.6336-pre1 and now its working fine at my end.

Hence closing this issue.