summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla42602.cs
blob: 05e4101308e20242f8b5b2e87b0f0d1a0eacd5b4 (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
using System;

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{
	[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
		{

		}
	}
}