summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs
blob: 3c51805b84151d79bad76afa9a2356b87eba694b (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
46
47
48
49
50
´╗┐namespace Xamarin.Forms.PlatformConfiguration.macOSSpecific
{
	using FormsElement = Forms.TabbedPage;

	public static class TabbedPage
	{
		#region TabsStyle
		public static readonly BindableProperty TabsStyleProperty = BindableProperty.Create("TabsStyle", typeof(TabsStyle), typeof(TabbedPage), TabsStyle.Default);

		public static TabsStyle GetTabsStyle(BindableObject element)
		{
			return (TabsStyle)element.GetValue(TabsStyleProperty);
		}

		public static void SetTabsStyle(BindableObject element, TabsStyle value)
		{
			element.SetValue(TabsStyleProperty, value);
		}

		public static TabsStyle GetTabsStyle(this IPlatformElementConfiguration<macOS, FormsElement> config)
		{
			return GetTabsStyle(config.Element);
		}

		public static IPlatformElementConfiguration<macOS, FormsElement> SetShowTabs(this IPlatformElementConfiguration<macOS, FormsElement> config, TabsStyle value)
		{
			SetTabsStyle(config.Element, value);
			return config;
		}

		public static IPlatformElementConfiguration<macOS, FormsElement> ShowTabsOnNavigation(this IPlatformElementConfiguration<macOS, FormsElement> config)
		{
			SetTabsStyle(config.Element, TabsStyle.OnNavigation);
			return config;
		}

		public static IPlatformElementConfiguration<macOS, FormsElement> ShowTabs(this IPlatformElementConfiguration<macOS, FormsElement> config)
		{
			SetTabsStyle(config.Element, TabsStyle.Default);
			return config;
		}

		public static IPlatformElementConfiguration<macOS, FormsElement> HideTabs(this IPlatformElementConfiguration<macOS, FormsElement> config)
		{
			SetTabsStyle(config.Element, TabsStyle.Hidden);
			return config;
		}
		#endregion
	}
}