-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue7111.cs
58 lines (49 loc) · 1.54 KB
/
Issue7111.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
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 7111, "[Bug] [WPF] Label with a predefined FontSize value throws an exception", PlatformAffected.WPF)]
public class Issue7111 : TestContentPage
{
protected override void Init()
{
var stack = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.Center
};
var labelBody = new Label
{
Text = "If you see this, things didn't crash and it worked",
FontSize = Device.GetNamedSize(NamedSize.Body, typeof(Label))
};
var labelCaption = new Label
{
Text = "If you see this, things didn't crash and it worked",
FontSize = Device.GetNamedSize(NamedSize.Caption, typeof(Label))
};
var labelHeader = new Label
{
Text = "If you see this, things didn't crash and it worked",
FontSize = Device.GetNamedSize(NamedSize.Header, typeof(Label))
};
var labelSubtitle = new Label
{
Text = "If you see this, things didn't crash and it worked",
FontSize = Device.GetNamedSize(NamedSize.Subtitle, typeof(Label))
};
var labelTitle = new Label
{
Text = "If you see this, things didn't crash and it worked",
FontSize = Device.GetNamedSize(NamedSize.Title, typeof(Label))
};
stack.Children.Add(labelBody);
stack.Children.Add(labelCaption);
stack.Children.Add(labelHeader);
stack.Children.Add(labelSubtitle);
stack.Children.Add(labelTitle);
Content = stack;
}
}
}