-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue1613.cs
87 lines (75 loc) · 1.93 KB
/
Issue1613.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Maps;
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.Github5000)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1613, "Map.GetSizeRequest always returns map's current size", PlatformAffected.Android | PlatformAffected.iOS)]
public class Issue1613 : ContentPage
{
public Issue1613()
{
Build();
}
async void Build()
{
var image = new Image
{
Source = "https://raw.githubusercontent.com/xamarin/Xamarin.Forms/master/banner.png",
Aspect = Aspect.AspectFill,
Opacity = 0.5,
};
var name = new Label
{
Text = "Foo",
#pragma warning disable 618
XAlign = TextAlignment.Center,
#pragma warning restore 618
#pragma warning disable 618
YAlign = TextAlignment.Center,
#pragma warning restore 618
#pragma warning disable 618
Font = Font.SystemFontOfSize(30, FontAttributes.Bold),
#pragma warning restore 618
TextColor = Color.White,
};
var nameView = new AbsoluteLayout
{
HeightRequest = 170,
BackgroundColor = Color.Black,
Children = {
{image, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All},
{name, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All}
},
};
var addressLabel = new Label
{
Text = "Loading address…",
#pragma warning disable 618
XAlign = TextAlignment.Center,
#pragma warning restore 618
#pragma warning disable 618
YAlign = TextAlignment.Center,
#pragma warning restore 618
};
var map = new Map
{
VerticalOptions = LayoutOptions.FillAndExpand,
};
Content = new StackLayout
{
Children = { nameView, addressLabel, map },
};
await Task.Delay(1000);
addressLabel.Text = "Updated with new\nmultiline\nlabel";
}
}
}