summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs
blob: 46fbb6bb8e65a29ec7744d0f4a49d814eddb464b (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
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers = true)]
	[Issue (IssueTracker.Bugzilla, 37863, "Password is readable when Entry.IsEnabled is false ",
		PlatformAffected.WinPhone)]
	public class Bugzilla37863 : TestContentPage
	{
		protected override void Init ()
		{
			var label = new Label {
				Text =
					"Click the button to toggle IsEnabled on the password entry below. The actual password text should never show. If the text shows, the test has failed."
			};
			var entry = new Entry { IsPassword = true, Text = "swordfish" };
			var button = new Button { Text = "Toggle IsEnabled" };

			button.Clicked += (sender, args) => { entry.IsEnabled = !entry.IsEnabled; };

			Content = new StackLayout {
				Children = { label, entry, button }
			};
		}
	}
}