diff options
author | Seunghyun Choi <sh4682.choi@samsung.com> | 2017-01-12 20:12:18 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-04-24 13:36:48 +0900 |
commit | e256a899dafe8c4e37fea3a098d490ab69c2a946 (patch) | |
tree | 8b63c85b3a816905e0ee2f6ee3337ea6f62e6d86 /Xamarin.Forms.Core | |
parent | 17ada444eb00dcc11fb2413cf73138b88ec7814a (diff) | |
download | xamarin-forms-e256a899dafe8c4e37fea3a098d490ab69c2a946.tar.gz xamarin-forms-e256a899dafe8c4e37fea3a098d490ab69c2a946.tar.bz2 xamarin-forms-e256a899dafe8c4e37fea3a098d490ab69c2a946.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')
3 files changed, 41 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 + } +} diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj index bf2fdeff..bca78f26 100644 --- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj +++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj @@ -114,6 +114,8 @@ <Compile Include="PlatformConfiguration\TizenSpecific\ProgressBar.cs" /> <Compile Include="PlatformConfiguration\TizenSpecific\Button.cs" /> <Compile Include="PlatformConfiguration\TizenSpecific\ButtonStyle.cs" /> + <Compile Include="PlatformConfiguration\TizenSpecific\Switch.cs" /> + <Compile Include="PlatformConfiguration\TizenSpecific\SwitchStyle.cs" /> <Compile Include="PlatformConfiguration\WindowsSpecific\MasterDetailPage.cs" /> <Compile Include="PlatformConfiguration\WindowsSpecific\CollapseStyle.cs" /> <Compile Include="Configuration.cs" /> |