summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/TimePicker.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/TimePicker.cs')
-rw-r--r--Xamarin.Forms.Core/TimePicker.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/TimePicker.cs b/Xamarin.Forms.Core/TimePicker.cs
index 0a33c2e3..a90b378e 100644
--- a/Xamarin.Forms.Core/TimePicker.cs
+++ b/Xamarin.Forms.Core/TimePicker.cs
@@ -4,7 +4,7 @@ using Xamarin.Forms.Platform;
namespace Xamarin.Forms
{
[RenderWith(typeof(_TimePickerRenderer))]
- public class TimePicker : View
+ public class TimePicker : View, IElementConfiguration<TimePicker>
{
public static readonly BindableProperty FormatProperty = BindableProperty.Create(nameof(Format), typeof(string), typeof(TimePicker), "t");
@@ -16,6 +16,13 @@ namespace Xamarin.Forms
return time.TotalHours < 24 && time.TotalMilliseconds >= 0;
});
+ readonly Lazy<PlatformConfigurationRegistry<TimePicker>> _platformConfigurationRegistry;
+
+ public TimePicker()
+ {
+ _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<TimePicker>>(() => new PlatformConfigurationRegistry<TimePicker>(this));
+ }
+
public string Format
{
get { return (string)GetValue(FormatProperty); }
@@ -33,5 +40,10 @@ namespace Xamarin.Forms
get { return (TimeSpan)GetValue(TimeProperty); }
set { SetValue(TimeProperty, value); }
}
+
+ public IPlatformElementConfiguration<T, TimePicker> On<T>() where T : IConfigPlatform
+ {
+ return _platformConfigurationRegistry.Value.On<T>();
+ }
}
} \ No newline at end of file