summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Stepper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/Stepper.cs')
-rw-r--r--Xamarin.Forms.Core/Stepper.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/Stepper.cs b/Xamarin.Forms.Core/Stepper.cs
index 2a3de841..f9742ccc 100644
--- a/Xamarin.Forms.Core/Stepper.cs
+++ b/Xamarin.Forms.Core/Stepper.cs
@@ -4,7 +4,7 @@ using Xamarin.Forms.Platform;
namespace Xamarin.Forms
{
[RenderWith(typeof(_StepperRenderer))]
- public class Stepper : View
+ public class Stepper : View, IElementConfiguration<Stepper>
{
public static readonly BindableProperty MaximumProperty = BindableProperty.Create("Maximum", typeof(double), typeof(Stepper), 100.0, validateValue: (bindable, value) =>
{
@@ -42,8 +42,11 @@ namespace Xamarin.Forms
public static readonly BindableProperty IncrementProperty = BindableProperty.Create("Increment", typeof(double), typeof(Stepper), 1.0);
+ readonly Lazy<PlatformConfigurationRegistry<Stepper>> _platformConfigurationRegistry;
+
public Stepper()
{
+ _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Stepper>>(() => new PlatformConfigurationRegistry<Stepper>(this));
}
public Stepper(double min, double max, double val, double increment)
@@ -90,5 +93,10 @@ namespace Xamarin.Forms
}
public event EventHandler<ValueChangedEventArgs> ValueChanged;
+
+ public IPlatformElementConfiguration<T, Stepper> On<T>() where T : IConfigPlatform
+ {
+ return _platformConfigurationRegistry.Value.On<T>();
+ }
}
} \ No newline at end of file