summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs')
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs b/Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs
new file mode 100644
index 00000000..3c51805b
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/macOSSpecific/TabbedPage.cs
@@ -0,0 +1,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
+ }
+}