summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/PlatformConfiguration
diff options
context:
space:
mode:
authorSeunghyun Choi <sh4682.choi@samsung.com>2017-01-12 20:12:18 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:16 +0900
commit671b4930f347fcc96f9e24d7c504aa72b7b971b9 (patch)
treea737b11ee409d8b4201696f81093b519fd934a7c /Xamarin.Forms.Core/PlatformConfiguration
parent28ad177fd48d37e4110b636cc17330d8dd08eb5f (diff)
downloadxamarin-forms-671b4930f347fcc96f9e24d7c504aa72b7b971b9.tar.gz
xamarin-forms-671b4930f347fcc96f9e24d7c504aa72b7b971b9.tar.bz2
xamarin-forms-671b4930f347fcc96f9e24d7c504aa72b7b971b9.zip
Add Switch Style
- Add Switch Style(CheckBox, Favorite) - Approval of the RFC is required. (http://suprem.sec.samsung.net/confluence/display/SPTDTLC/%5BFormsTizen%5D+RFC+5+-+Switch) Change-Id: If98be73fc84633b670328f723e0e4aa7ccebc82f Signed-off-by: Seunghyun Choi <sh4682.choi@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Core/PlatformConfiguration')
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Switch.cs30
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/SwitchStyle.cs9
2 files changed, 39 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Switch.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Switch.cs
new file mode 100644
index 00000000..cef38f34
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/Switch.cs
@@ -0,0 +1,30 @@
+namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
+{
+ using FormsElement = Forms.Switch;
+
+ public static class Switch
+ {
+ public static readonly BindableProperty SwitchStyleProperty = BindableProperty.Create("SwitchStyle", typeof(SwitchStyle), typeof(FormsElement), SwitchStyle.Default);
+
+ public static SwitchStyle GetSwitchStyle(BindableObject element)
+ {
+ return (SwitchStyle)element.GetValue(SwitchStyleProperty);
+ }
+
+ public static void SetSwitchStyle(BindableObject element, SwitchStyle value)
+ {
+ element.SetValue(SwitchStyleProperty, value);
+ }
+
+ public static SwitchStyle GetSwitchStyle(this IPlatformElementConfiguration<Tizen, FormsElement> config)
+ {
+ return GetSwitchStyle(config.Element);
+ }
+
+ public static IPlatformElementConfiguration<Tizen, FormsElement> SetSwitchStyle(this IPlatformElementConfiguration<Tizen, FormsElement> config, SwitchStyle value)
+ {
+ SetSwitchStyle(config.Element, value);
+ return config;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/SwitchStyle.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/SwitchStyle.cs
new file mode 100644
index 00000000..a7980fe2
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/SwitchStyle.cs
@@ -0,0 +1,9 @@
+namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
+{
+ public enum SwitchStyle
+ {
+ Default,
+ CheckBox,
+ Favorite
+ }
+}