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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 38770, "RaiseChild and LowerChild do not work on Windows", PlatformAffected.WinRT)]
public class Bugzilla38770 : TestContentPage
{
protected override void Init()
{
var red = new BoxView
{
BackgroundColor = Color.Red,
WidthRequest = 50,
HeightRequest = 50,
TranslationX = 25
};
var green = new BoxView
{
BackgroundColor = Color.Green,
WidthRequest = 50,
HeightRequest = 50
};
var blue = new BoxView
{
BackgroundColor = Color.Blue,
WidthRequest = 50,
HeightRequest = 50,
TranslationX = -25
};
var boxStack = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Spacing = 0,
Margin = new Thickness(0,50,0,0),
HorizontalOptions = LayoutOptions.Center,
Children =
{
red,
green,
blue
}
};
var raiseButtons = new StackLayout
{
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.Center,
Children =
{
new Button
{
Text = "Raise Red",
WidthRequest = 110,
Command = new Command(() => boxStack.RaiseChild(red))
},
new Button
{
Text = "Raise Green",
WidthRequest = 110,
Command = new Command(() => boxStack.RaiseChild(green))
},
new Button
{
Text = "Raise Blue",
WidthRequest = 110,
Command = new Command(() => boxStack.RaiseChild(blue))
}
}
};
var lowerButtons = new StackLayout
{
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.Center,
Children =
{
new Button
{
Text = "Lower Red",
WidthRequest = 110,
Command = new Command(() => boxStack.LowerChild(red))
},
new Button
{
Text = "Lower Green",
WidthRequest = 110,
Command = new Command(() => boxStack.LowerChild(green))
},
new Button
{
Text = "Lower Blue",
WidthRequest = 110,
Command = new Command(() => boxStack.LowerChild(blue))
}
}
};
Content = new StackLayout
{
Children =
{
raiseButtons,
lowerButtons,
boxStack
}
};
}
}
}
|