Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Add Xamarin.Forms.Platform.Tizen project
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava committed May 1, 2017
1 parent 8af6f3e commit 194fe95
Show file tree
Hide file tree
Showing 135 changed files with 16,241 additions and 1 deletion.
1 change: 1 addition & 0 deletions Xamarin.Forms.Core/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static class Device
public const string UWP = "UWP";
public const string WinRT = "WinRT";
public const string macOS = "macOS";
public const string Tizen = "Tizen";

[EditorBrowsable(EditorBrowsableState.Never)]
public static DeviceInfo info;
Expand Down
30 changes: 30 additions & 0 deletions Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.Entry;

public static class Entry
{
public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(string), typeof(FormsElement), FontWeight.None);

public static string GetFontWeight(BindableObject element)
{
return (string)element.GetValue(FontWeightProperty);
}

public static void SetFontWeight(BindableObject element, string weight)
{
element.SetValue(FontWeightProperty, weight);
}

public static string GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetFontWeight(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, string weight)
{
SetFontWeight(config.Element, weight);
return config;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
public static class FontWeight
{
public const string None = "None";
public const string Normal = "Normal";
public const string Thin = "Thin";
public const string UltraLight = "UltraLight";
public const string Light = "Light";
public const string Book = "Book";
public const string Medium = "Medium";
public const string SemiBold = "SemiBold";
public const string Bold = "Bold";
public const string UltraBold = "UltraBold";
public const string Black= "Black";
public const string ExtraBlack= "ExtraBlack";
}
}
30 changes: 30 additions & 0 deletions Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Image.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.Image;

public static class Image
{
public static readonly BindableProperty BlendColorProperty = BindableProperty.Create("BlendColor", typeof(Color), typeof(FormsElement), Color.Default);

public static Color GetBlendColor(BindableObject element)
{
return (Color)element.GetValue(BlendColorProperty);
}

public static void SetBlendColor(BindableObject element, Color color)
{
element.SetValue(BlendColorProperty, color);
}

public static Color GetBlendColor(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetBlendColor(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetBlendColor(this IPlatformElementConfiguration<Tizen, FormsElement> config, Color color)
{
SetBlendColor(config.Element, color);
return config;
}
}
}
30 changes: 30 additions & 0 deletions Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.Label;

public static class Label
{
public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(string), typeof(FormsElement), FontWeight.None);

public static string GetFontWeight(BindableObject element)
{
return (string)element.GetValue(FontWeightProperty);
}

public static void SetFontWeight(BindableObject element, string weight)
{
element.SetValue(FontWeightProperty, weight);
}

public static string GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetFontWeight(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, string weight)
{
SetFontWeight(config.Element, weight);
return config;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.NavigationPage;

public static class NavigationPage
{
#region HasBreadCrumbsBar
public static readonly BindableProperty HasBreadCrumbsBarProperty
= BindableProperty.CreateAttached("HasBreadCrumbsBar", typeof(bool), typeof(FormsElement), false);

public static bool GetHasBreadCrumbsBar(BindableObject element)
{
return (bool)element.GetValue(HasBreadCrumbsBarProperty);
}

public static void SetHasBreadCrumbsBar(BindableObject element, bool value)
{
element.SetValue(HasBreadCrumbsBarProperty, value);
}

public static bool HasBreadCrumbsBar(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetHasBreadCrumbsBar(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetHasBreadCrumbsBar(this IPlatformElementConfiguration<Tizen, FormsElement> config, bool value)
{
SetHasBreadCrumbsBar(config.Element, value);
return config;
}
#endregion
}
}
33 changes: 33 additions & 0 deletions Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Page.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.Page;

public static class Page
{
#region BreadCrumbName
public static readonly BindableProperty BreadCrumbProperty
= BindableProperty.CreateAttached("BreadCrumb", typeof(string), typeof(FormsElement), default(string));

public static string GetBreadCrumb(BindableObject page)
{
return (string)page.GetValue(BreadCrumbProperty);
}

public static void SetBreadCrumb(BindableObject page, string value)
{
page.SetValue(BreadCrumbProperty, value);
}

public static string GetBreadCrumb(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetBreadCrumb(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetBreadCrumb(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value)
{
SetBreadCrumb(config.Element, value);
return config;
}
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
using FormsElement = Forms.ProgressBar;

public static class ProgressBar
{
public static readonly BindableProperty ProgressBarPulsingStatusProperty =
BindableProperty.Create("ProgressBarPulsingStatus", typeof(bool),
typeof(FormsElement), false);

public static bool GetPulsingStatus(BindableObject element)
{
return (bool)element.GetValue(ProgressBarPulsingStatusProperty);
}

public static void SetPulsingStatus(BindableObject element, bool isPulsing)
{
string style = VisualElement.GetStyle(element);
if (style == ProgressBarStyle.Pending)
{
element.SetValue(ProgressBarPulsingStatusProperty, isPulsing);
}
}

public static bool GetPulsingStatus(this IPlatformElementConfiguration<Tizen, FormsElement> config)
{
return GetPulsingStatus(config.Element);
}

public static IPlatformElementConfiguration<Tizen, FormsElement> SetPulsingStatus(this IPlatformElementConfiguration<Tizen, FormsElement> config, bool isPulsing)
{
SetPulsingStatus(config.Element, isPulsing);
return config;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
{
public static class ButtonStyle
{
public const string Default = "default";
public const string Circle = "circle";
public const string Bottom = "bottom";
}

public static class SwitchStyle
{
public const string CheckBox = "default";
public const string Toggle = "toggle";
public const string Favorite = "favorite";
}

public static class ProgressBarStyle
{
public const string Default = "default";
public const string Pending = "pending";
}

public static class TabbedPageStyle
{
public const string Default = "default";
public const string Tabbar = "tabbar";
public const string TabbarWithTitle = "tabbar_with_title";
}
}
Loading

0 comments on commit 194fe95

Please sign in to comment.