diff options
Diffstat (limited to 'Xamarin.Forms.Core/PlatformConfiguration')
3 files changed, 78 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs new file mode 100644 index 00000000..c84dcc36 --- /dev/null +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Entry.cs @@ -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(FontWeight), typeof(FormsElement), FontWeight.None); + + public static FontWeight GetFontWeight(BindableObject element) + { + return (FontWeight)element.GetValue(FontWeightProperty); + } + + public static void SetFontWeight(BindableObject element, FontWeight weight) + { + element.SetValue(FontWeightProperty, weight); + } + + public static FontWeight GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) + { + return GetFontWeight(config.Element); + } + + public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, FontWeight 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 new file mode 100644 index 00000000..8838bc07 --- /dev/null +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/FontWeight.cs @@ -0,0 +1,18 @@ +namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific +{ + public enum FontWeight + { + None, + Normal, + Thin, + UltraLight, + Light, + Book, + Medium, + SemiBold, + Bold, + UltraBold, + Black, + ExtraBlack + } +} diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs new file mode 100644 index 00000000..d95daa83 --- /dev/null +++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Label.cs @@ -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(FontWeight), typeof(FormsElement), FontWeight.None); + + public static FontWeight GetFontWeight(BindableObject element) + { + return (FontWeight)element.GetValue(FontWeightProperty); + } + + public static void SetFontWeight(BindableObject element, FontWeight weight) + { + element.SetValue(FontWeightProperty, weight); + } + + public static FontWeight GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) + { + return GetFontWeight(config.Element); + } + + public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, FontWeight weight) + { + SetFontWeight(config.Element, weight); + return config; + } + } +} |