diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-02-14 12:42:06 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-07-10 11:11:19 +0900 |
commit | 6899727e91bb8a0d39255e932c586178529520e4 (patch) | |
tree | 755e19bcaacaf871ed4fc6a81ce48e4f37609d1d /Xamarin.Forms.Core | |
parent | 45730855f3b727390f6fd7b861a1cfcc3c37cc5d (diff) | |
download | xamarin-forms-6899727e91bb8a0d39255e932c586178529520e4.tar.gz xamarin-forms-6899727e91bb8a0d39255e932c586178529520e4.tar.bz2 xamarin-forms-6899727e91bb8a0d39255e932c586178529520e4.zip |
Modify FontWeight type for flexibility
This change is introduced in RFC-15
Change-Id: I8bc22b8818ccda3bee95c83e6979e39810e6b028
Diffstat (limited to 'Xamarin.Forms.Core')
3 files changed, 25 insertions, 25 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs index c84dcc36..6572610a 100644 --- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs @@ -4,24 +4,24 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific public static class Entry { - public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(FontWeight), typeof(FormsElement), FontWeight.None); + public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(string), typeof(FormsElement), FontWeight.None); - public static FontWeight GetFontWeight(BindableObject element) + public static string GetFontWeight(BindableObject element) { - return (FontWeight)element.GetValue(FontWeightProperty); + return (string)element.GetValue(FontWeightProperty); } - public static void SetFontWeight(BindableObject element, FontWeight weight) + public static void SetFontWeight(BindableObject element, string weight) { element.SetValue(FontWeightProperty, weight); } - public static FontWeight GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) + public static string GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) { return GetFontWeight(config.Element); } - public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, FontWeight weight) + public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, string weight) { SetFontWeight(config.Element, weight); return config; diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs index 8838bc07..763935b2 100644 --- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs @@ -1,18 +1,18 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific { - public enum FontWeight + public static class FontWeight { - None, - Normal, - Thin, - UltraLight, - Light, - Book, - Medium, - SemiBold, - Bold, - UltraBold, - Black, - ExtraBlack + 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"; } } diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs index d95daa83..f560057a 100644 --- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs @@ -4,24 +4,24 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific public static class Label { - public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(FontWeight), typeof(FormsElement), FontWeight.None); + public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(string), typeof(FormsElement), FontWeight.None); - public static FontWeight GetFontWeight(BindableObject element) + public static string GetFontWeight(BindableObject element) { - return (FontWeight)element.GetValue(FontWeightProperty); + return (string)element.GetValue(FontWeightProperty); } - public static void SetFontWeight(BindableObject element, FontWeight weight) + public static void SetFontWeight(BindableObject element, string weight) { element.SetValue(FontWeightProperty, weight); } - public static FontWeight GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) + public static string GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) { return GetFontWeight(config.Element); } - public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, FontWeight weight) + public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, string weight) { SetFontWeight(config.Element, weight); return config; |