summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-11-01 09:35:14 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-11-15 19:56:03 (GMT)
commit0d883f64cb110fbca6848cb7821d66bfbdd8bbbe (patch)
tree88d4cd340ba04440835681fa253450595300d782 /Xamarin.Forms.Core
parent4554e822e3cf5ae71724a8fc89d1a8728118f060 (diff)
downloadxamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.zip
xamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.tar.gz
xamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.tar.bz2
[C] Add cornerRadius validation, docs
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/Frame.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/Frame.cs b/Xamarin.Forms.Core/Frame.cs
index bb35f14..c93a642 100644
--- a/Xamarin.Forms.Core/Frame.cs
+++ b/Xamarin.Forms.Core/Frame.cs
@@ -11,7 +11,9 @@ namespace Xamarin.Forms
public static readonly BindableProperty HasShadowProperty = BindableProperty.Create("HasShadow", typeof(bool), typeof(Frame), true);
- public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(Frame), -1.0f);
+ public static readonly BindableProperty CornerRadiusProperty =
+ BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(Frame), -1.0f,
+ validateValue: (bindable, value) => ((float)value) == -1.0f || ((float)value) >= 0f);
readonly Lazy<PlatformConfigurationRegistry<Frame>> _platformConfigurationRegistry;