From 0d883f64cb110fbca6848cb7821d66bfbdd8bbbe Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Tue, 1 Nov 2016 10:35:14 +0100 Subject: [C] Add cornerRadius validation, docs --- Xamarin.Forms.Core/Frame.cs | 4 +++- docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml | 31 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Xamarin.Forms.Core/Frame.cs b/Xamarin.Forms.Core/Frame.cs index bb35f147..c93a642c 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; diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml index 22e39908..77677ad7 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml @@ -91,6 +91,37 @@ MainPage = new ContentPage () { A Frame has a default of 20. + + + + Property + + 2.0.0.0 + + + System.Single + + + To be added. + To be added. + To be added. + + + + + + Field + + 2.0.0.0 + + + Xamarin.Forms.BindableProperty + + + To be added. + To be added. + + -- cgit v1.2.3