summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-02-14 03:42:06 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:29 (GMT)
commit4b00ace5a50d037600bd84eef99453ff92565e6c (patch)
treeea4099340f788c68ba91cdccd1cb1b6b2de9c70a /Xamarin.Forms.Core
parent15319699dd2499b5ce7a0e631ce633a5e3a350e2 (diff)
downloadxamarin-forms-4b00ace5a50d037600bd84eef99453ff92565e6c.zip
xamarin-forms-4b00ace5a50d037600bd84eef99453ff92565e6c.tar.gz
xamarin-forms-4b00ace5a50d037600bd84eef99453ff92565e6c.tar.bz2
Modify FontWeight type for flexibility
This change is introduced in RFC-15 Change-Id: I8bc22b8818ccda3bee95c83e6979e39810e6b028
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs12
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs26
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs12
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 c84dcc3..6572610 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 8838bc0..763935b 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 d95daa8..f560057 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;