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

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers = true)]
	[Issue (IssueTracker.Bugzilla, 35490, "Label Text Misaligned in Windows Phone 8.1 and WinRT",
		PlatformAffected.WinPhone | PlatformAffected.WinRT)]
	public class Bugzilla35490 : TestContentPage
	{
		protected override void Init ()
		{
			var instructions = new Label {
				Text =
					"The label in the red box below should be centered horizontally and vertically. If it's not, this test has failed."
			};


			var label = new Label {
				BackgroundColor = Color.Red,
				TextColor = Color.White,
				HorizontalTextAlignment = TextAlignment.Center,
				VerticalTextAlignment = TextAlignment.Center,
				HeightRequest = 200,
				HorizontalOptions = LayoutOptions.Fill,
				Text = "Should be centered horizontally and vertically"
			};


			Content = new StackLayout {
				HorizontalOptions = LayoutOptions.Fill,
				VerticalOptions = LayoutOptions.Fill,
				Children = {
					instructions,
					label
				}
			};
		}
	}
}