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
|
using System;
using Xamarin.Forms.CustomAttributes;
namespace Xamarin.Forms.Controls
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 1384, "Image is grid issue", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
public class Issue1384:ContentPage
{
public Issue1384 ()
{
var grid = new Grid {BackgroundColor = Color.Red, VerticalOptions=LayoutOptions.Start};
grid.Children.Add (new Image {Source = "photo.jpg", Aspect = Aspect.AspectFit});
grid.Children.Add (new Label {
Opacity =.75,
YAlign = TextAlignment.Start,
XAlign = TextAlignment.End,
Text ="top and flush right",
Font = Font.SystemFontOfSize (NamedSize.Large),
VerticalOptions=LayoutOptions.Start,
HorizontalOptions=LayoutOptions.End,
HeightRequest=30,
TextColor = Color.White
});
grid.Children.Add (new Label {
Opacity =.75,
YAlign = TextAlignment.End,
Text ="bottom and flush left",
Font = Font.SystemFontOfSize (NamedSize.Large),
VerticalOptions=LayoutOptions.End,
HeightRequest=40,
TextColor = Color.White,
BackgroundColor = Color.Green,
});
Content = grid;
}
}
}
|