summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen
diff options
context:
space:
mode:
authorSungHyun Min <shyun.min@samsung.com>2016-12-12 12:02:40 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:15 +0900
commit028b8e7a2f6c7f161aaff5d5850824a9a2db4449 (patch)
treedea4ea309887216f4dcc348bd57918e351d09127 /Xamarin.Forms.Platform.Tizen
parent106115ab816682e652c3c5693cfe5d12af402435 (diff)
downloadxamarin-forms-028b8e7a2f6c7f161aaff5d5850824a9a2db4449.tar.gz
xamarin-forms-028b8e7a2f6c7f161aaff5d5850824a9a2db4449.tar.bz2
xamarin-forms-028b8e7a2f6c7f161aaff5d5850824a9a2db4449.zip
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.Platform.Tizen')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs46
1 files changed, 42 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs
index 3aacd3f4..6bf86b16 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs
@@ -1,4 +1,6 @@
using System.ComponentModel;
+
+using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.ProgressBar;
using EProgressBar = ElmSharp.ProgressBar;
namespace Xamarin.Forms.Platform.Tizen
@@ -37,9 +39,28 @@ namespace Xamarin.Forms.Platform.Tizen
base.OnElementChanged(e);
}
+ protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ base.OnElementPropertyChanged(sender, e);
+ if (e.PropertyName == ProgressBar.ProgressProperty.PropertyName)
+ {
+ UpdateProgress();
+ }
+ else if (e.PropertyName == Specific.ProgressBarPendingModeProperty.PropertyName)
+ {
+ UpdatePendingMode();
+ }
+ else if (e.PropertyName == Specific.ProgressBarPulsingStatusProperty.PropertyName)
+ {
+ UpdatePulsingStatus();
+ }
+ }
+
void UpdateAll()
{
UpdateProgress();
+ UpdatePendingMode();
+ UpdatePulsingStatus();
}
void UpdateProgress()
@@ -47,12 +68,29 @@ namespace Xamarin.Forms.Platform.Tizen
Control.Value = Element.Progress;
}
- protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ void UpdatePendingMode()
{
- base.OnElementPropertyChanged(sender, e);
- if (e.PropertyName == ProgressBar.ProgressProperty.PropertyName)
+ bool isPending = Specific.GetPendingMode(Element);
+ if (isPending)
{
- UpdateProgress();
+ Control.Style = "pending";
+ }
+ else
+ {
+ Control.Style = "default";
+ }
+ }
+
+ void UpdatePulsingStatus()
+ {
+ bool isPulsing = Specific.GetPulsingStatus(Element);
+ if (isPulsing)
+ {
+ Control.PlayPulse();
+ }
+ else
+ {
+ Control.StopPulse();
}
}
}