summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs
blob: 5973ebab6f05beafb8f313f90ed5fb9621f09993 (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
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xamarin.Forms.Controls
{
	public class ProductCellView : StackLayout
	{
		Label _timeLabel;
		Label _brandLabel;
		StackLayout _stack;
		public ProductCellView (string text)
		{
			_stack = new StackLayout ();
			_brandLabel = new Label {Text = "BrandLabel", HorizontalTextAlignment = TextAlignment.Center};
			_stack.Children.Add (_brandLabel);


			var frame = new Frame {
				Content = _stack,
				BackgroundColor = Device.OnPlatform (iOS: new Color (1), Android: new Color (0.2), WinPhone: new Color (0.2))
			};
			_timeLabel = new Label {
				Text = text
			};
			Children.Add (_timeLabel);
			Children.Add (frame);
			Padding = new Size (20, 20);
		}
	}
}