summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42602.cs
blob: aaedcd07d9cc427bbe4713e81ba52b162161ca53 (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
45
46
47
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

#if UITEST
using NUnit.Framework;
using Xamarin.Forms.Core.UITests;
#endif

namespace Xamarin.Forms.Controls
{
#if UITEST
	[Category(UITestCategories.BoxView)]
#endif

	[Preserve(AllMembers = true)]
	[Issue(IssueTracker.Bugzilla, 42602, "[Win] Custom BoxView Renderer Does Not Render All Its Children Elements", PlatformAffected.WinRT)]
	public class Bugzilla42602 : TestContentPage
	{
		AbsoluteLayout content;

		protected override void Init()
		{
			//background white 800 x 600 square
			content = new AbsoluteLayout()
			{
				BackgroundColor = Color.White,
				WidthRequest = 800,
				HeightRequest = 800,
				VerticalOptions = LayoutOptions.CenterAndExpand,
				HorizontalOptions = LayoutOptions.CenterAndExpand
			};

			//test TextBoxView 400 x 400, color gray, should have a red ellipse and a red "hello world"

			var test = new TextBoxView() { WidthRequest = 300, HeightRequest = 300, BackgroundColor = Color.Blue };
			content.Children.Add(test, new Point((content.WidthRequest - test.WidthRequest) / 2f, (content.HeightRequest - test.HeightRequest) / 2f));

			Content = content;
		}

		public class TextBoxView : BoxView
		{

		}
	}
}