-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue11137.cs
71 lines (59 loc) · 1.64 KB
/
Issue11137.cs
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
using Xamarin.Forms.Internals;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Shapes;
using System.Collections.Generic;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
using Xamarin.Forms.Core.UITests;
#endif
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[Category(UITestCategories.Frame)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 11137,
"[Bug] UWP - Path object resized to zero height or width crashes ShapeRenderer",
PlatformAffected.UWP)]
public class Issue11137 : TestContentPage
{
protected override void Init()
{
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
Title = "Issue 11137";
var grid = new Grid();
grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
var instructions = new Label
{
Padding = 12,
BackgroundColor = Color.Black,
TextColor = Color.White,
Text = "Reduce the Window size to a minimum, without exceptions the test has passed."
};
var path = new Path
{
BackgroundColor = Color.LightGray,
Stroke = Brush.Black,
Fill = Brush.Blue,
StrokeThickness = 4,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
Margin = new Thickness(300)
};
EllipseGeometry ellipseGeometry = new EllipseGeometry
{
Center = new Point(50, 50),
RadiusX = 50,
RadiusY = 50
};
path.Data = ellipseGeometry;
grid.Children.Add(instructions);
Grid.SetRow(instructions, 0);
grid.Children.Add(path);
Grid.SetRow(path, 1);
Content = grid;
}
}
}