blob: 653ecdae98ba1832bd18262d3574bcbf9c266279 (
plain)
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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Xamarin.Forms.Controls
{
public class FrameGallery : ContentPage
{
readonly StackLayout _stack;
public FrameGallery ()
{
Content = _stack = new StackLayout { Padding = new Size (20, 20) };
//BackgroundColor = new Color (0.5, 0.5, 0.5);
BackgroundColor = Color.FromHex ("#8a2be2");
//BackgroundColor = Color.Aqua;
var frame = new Frame {
Content = new Button {
Text = "Framous!"
},
BackgroundColor = new[] { Device.Android, Device.Windows, Device.WinPhone }.Contains(Device.RuntimePlatform) ? new Color(0) : new Color(1),
VerticalOptions = LayoutOptions.FillAndExpand
};
_stack.Children.Add (frame);
}
}
}
|