diff options
Diffstat (limited to 'Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs')
-rw-r--r-- | Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/ProgressBar.cs new file mode 100644 index 00000000..8267ca04 --- /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; + } + } +} |