summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs
blob: 0ad71f6412effbb4ae5433cc85386318f99fe95a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif

namespace Xamarin.Forms.Controls
{
    [Preserve(AllMembers = true)]
    [Issue(IssueTracker.Bugzilla, 36479, "[WP8] Picker is not disabled when IsEnabled is set to false", PlatformAffected.WinPhone)]
    public class Bugzilla36479 : TestContentPage
    {
        protected override void Init()
        {
            var picker = new Picker
            {
                IsEnabled = false
            };
            picker.Items.Add("item");
            picker.Items.Add("item 2");
            
            Content = new StackLayout
            {
                Children =
                {
                    picker,
                    new Button
                    {
                        Command = new Command(() =>
                        {
                            if (picker.IsEnabled)
                                picker.IsEnabled = false;
                            else
                                picker.IsEnabled = true;
                        }),
                        Text = "Enable/Disable Picker"
                    }
                }
            };
        }
    }
}