summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/TabbedPage.cs
blob: 5fb6bf9cd79fd1adf27e05cb0a104696465b9ee3 (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
34
35
36
37
38
39
40
41
42
43
44
45
using Xamarin.Forms.Platform;

namespace Xamarin.Forms
{
	[RenderWith(typeof(_TabbedPageRenderer))]
	public class TabbedPage : MultiPage<Page>
	{
		public static readonly BindableProperty BarBackgroundColorProperty = BindableProperty.Create(nameof(BarBackgroundColor), typeof(Color), typeof(TabbedPage), Color.Default);

		public static readonly BindableProperty BarTextColorProperty = BindableProperty.Create(nameof(BarTextColor), typeof(Color), typeof(TabbedPage), Color.Default);

		public Color BarBackgroundColor
		{
			get
			{
				return (Color)GetValue(BarBackgroundColorProperty);
			}
			set
			{
				SetValue(BarBackgroundColorProperty, value);
			}
		}

		public Color BarTextColor
		{
			get
			{
				return (Color)GetValue(BarTextColorProperty);
			}
			set
			{
				SetValue(BarTextColorProperty, value);
			}
		}

		protected override Page CreateDefault(object item)
		{
			var page = new Page();
			if (item != null)
				page.Title = item.ToString();

			return page;
		}
	}
}