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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Maps;
namespace Xamarin.Forms.Controls.TestCasesPages
{
[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 = "http://www.califliving.com/title24-energy/images/sanfrancisco.jpg",
Aspect = Aspect.AspectFill,
Opacity = 0.5,
};
var name = new Label {
Text = "Foo",
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center,
Font = Font.SystemFontOfSize(30, FontAttributes.Bold),
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…",
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center,
};
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";
}
}
}
|