@@ -7,26 +7,76 @@ public class Issue31330 : ContentPage
7
7
{
8
8
public Issue31330 ( )
9
9
{
10
- var grid = new Grid ( ) ;
10
+ Grid grid = new Grid ( ) ;
11
+ grid . RowDefinitions = new RowDefinitionCollection
12
+ {
13
+ new RowDefinition { Height = GridLength . Auto } ,
14
+ new RowDefinition { Height = GridLength . Auto } ,
15
+ new RowDefinition { Height = GridLength . Star } ,
16
+ new RowDefinition { Height = GridLength . Star }
17
+ } ;
18
+
19
+ Label labelText = new Label { Text = "The test passes if the edges of the circle touch the BoxView." , FontAttributes = FontAttributes . Bold } ;
11
20
12
- var boxView = new BoxView
21
+ BoxView boxView = new BoxView
13
22
{
14
23
Color = Colors . Green ,
15
24
HeightRequest = 100 ,
16
25
WidthRequest = 100 ,
17
26
AutomationId = "Issue31330BoxView"
18
27
} ;
19
28
20
- var ellipse = new Ellipse
29
+ Ellipse ellipse = new Ellipse
21
30
{
22
- Fill = new SolidColorBrush ( Colors . Red ) ,
23
- StrokeThickness = 20 ,
31
+ Fill = Colors . Yellow ,
32
+ StrokeThickness = 0 ,
24
33
WidthRequest = 100 ,
25
34
HeightRequest = 100
26
35
} ;
27
36
37
+ Button button = new Button { Text = "Update StrokeThickness" } ;
38
+ button . Clicked += ( s , e ) =>
39
+ {
40
+ ellipse . StrokeThickness = 20 ;
41
+ } ;
42
+
43
+ Label label = new Label
44
+ {
45
+ Text = "Test passes if the Rectangle renders as filled shape for small height" ,
46
+ FontAttributes = FontAttributes . Bold
47
+ } ;
48
+
49
+ Rectangle rectangle = new Rectangle
50
+ {
51
+ WidthRequest = 50 ,
52
+ HeightRequest = 1.2 ,
53
+ Fill = Colors . Blue
54
+ } ;
55
+
56
+ Grid bottomGrid = new Grid { Background = Colors . AliceBlue } ;
57
+ bottomGrid . Children . Add ( label ) ;
58
+ bottomGrid . Children . Add ( rectangle ) ;
59
+
60
+ bottomGrid . RowDefinitions = new RowDefinitionCollection
61
+ {
62
+ new RowDefinition { Height = GridLength . Auto } ,
63
+ new RowDefinition { Height = GridLength . Star } ,
64
+ } ;
65
+
66
+ bottomGrid . SetRow ( label , 0 ) ;
67
+ bottomGrid . SetRow ( rectangle , 1 ) ;
68
+
69
+ grid . Children . Add ( labelText ) ;
70
+ grid . SetRow ( labelText , 0 ) ;
71
+ grid . Children . Add ( button ) ;
72
+ grid . SetRow ( button , 1 ) ;
28
73
grid . Children . Add ( boxView ) ;
74
+ grid . SetRow ( boxView , 2 ) ;
29
75
grid . Children . Add ( ellipse ) ;
76
+ grid . SetRow ( ellipse , 2 ) ;
77
+ grid . SetRow ( bottomGrid , 3 ) ;
78
+ grid . Children . Add ( bottomGrid ) ;
79
+
30
80
Content = grid ;
31
81
}
32
82
}
0 commit comments