summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authorSungHyun Min <shyun.min@samsung.com>2016-12-12 03:02:40 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:25 (GMT)
commitba15d44bb422b2cdc4295f753c2561907b80d852 (patch)
treeed95e3d568a379ff449ee4049508d476c1ffd16f /Xamarin.Forms.Core
parent6bfcd998bd0e0c6d514f17055d8a5222e57773ea (diff)
downloadxamarin-forms-ba15d44bb422b2cdc4295f753c2561907b80d852.zip
xamarin-forms-ba15d44bb422b2cdc4295f753c2561907b80d852.tar.gz
xamarin-forms-ba15d44bb422b2cdc4295f753c2561907b80d852.tar.bz2
Tizen Extension for ProgressBar
- Add Set/GetPendingMode methods - Add Set/GetPulsingStatus methods Change-Id: Id59b4b2a848035e3a6f414572c2e411c0fd98767 Signed-off-by: SungHyun Min <shyun.min@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs65
-rw-r--r--Xamarin.Forms.Core/Xamarin.Forms.Core.csproj3
2 files changed, 67 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs
new file mode 100644
index 0000000..8267ca0
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs
@@ -0,0 +1,65 @@
+
+namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
+{
+ using FormsElement = Forms.ProgressBar;
+
+ public static class ProgressBar
+ {
+ public static readonly BindableProperty ProgressBarPendingModeProperty =
+ BindableProperty.Create("ProgressBarPendingMode", typeof(bool),
+ typeof(FormsElement), false);
+
+ public static readonly BindableProperty ProgressBarPulsingStatusProperty =
+ BindableProperty.Create("ProgressBarPulsingStatus", typeof(bool),
+ typeof(FormsElement), false);
+
+ public static bool GetPendingMode(BindableObject element)
+ {
+ return (bool)element.GetValue(ProgressBarPendingModeProperty);
+ }
+
+ public static void SetPendingMode(BindableObject element, bool isPending)
+ {
+ if (!isPending)
+ {
+ SetPulsingStatus(element, false);
+ }
+ element.SetValue(ProgressBarPendingModeProperty, isPending);
+ }
+
+ public static bool GetPulsingStatus(BindableObject element)
+ {
+ return (bool)element.GetValue(ProgressBarPulsingStatusProperty);
+ }
+
+ public static void SetPulsingStatus(BindableObject element, bool isPulsing)
+ {
+ if (GetPendingMode(element))
+ {
+ element.SetValue(ProgressBarPulsingStatusProperty, isPulsing);
+ }
+ }
+
+ public static bool GetPendingMode(this IPlatformElementConfiguration<Tizen, FormsElement> config)
+ {
+ return GetPendingMode(config.Element);
+ }
+
+ public static IPlatformElementConfiguration<Tizen, FormsElement> SetPendingMode(this IPlatformElementConfiguration<Tizen, FormsElement> config, bool isPending)
+ {
+ SetPendingMode(config.Element, isPending);
+ return config;
+ }
+
+ public static bool GetPulsingStatus(this IPlatformElementConfiguration<Tizen, FormsElement> config)
+ {
+ return GetPulsingStatus(config.Element);
+ }
+
+ public static IPlatformElementConfiguration<Tizen, FormsElement> SetPulsingStatus(this IPlatformElementConfiguration<Tizen, FormsElement> config, bool isPulsing)
+ {
+ SetPulsingStatus(config.Element, isPulsing);
+ return config;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
index 0522a92..e2dbf02 100644
--- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
+++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -110,6 +110,7 @@
<Compile Include="PlatformConfiguration\iOSSpecific\UIStatusBarAnimation.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\UpdateMode.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\VisualElement.cs" />
+ <Compile Include="PlatformConfiguration\TizenSpecific\ProgressBar.cs" />
<Compile Include="PlatformConfiguration\WindowsSpecific\MasterDetailPage.cs" />
<Compile Include="PlatformConfiguration\WindowsSpecific\CollapseStyle.cs" />
<Compile Include="Configuration.cs" />