diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-11-01 10:35:14 +0100 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-11-15 11:56:03 -0800 |
commit | 0d883f64cb110fbca6848cb7821d66bfbdd8bbbe (patch) | |
tree | 88d4cd340ba04440835681fa253450595300d782 | |
parent | 4554e822e3cf5ae71724a8fc89d1a8728118f060 (diff) | |
download | xamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.tar.gz xamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.tar.bz2 xamarin-forms-0d883f64cb110fbca6848cb7821d66bfbdd8bbbe.zip |
[C] Add cornerRadius validation, docs
-rw-r--r-- | Xamarin.Forms.Core/Frame.cs | 4 | ||||
-rw-r--r-- | docs/Xamarin.Forms.Core/Xamarin.Forms/Frame.xml | 31 |
2 files changed, 34 insertions, 1 deletions
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<Frame>> _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 () { <remarks>A Frame has a default <see cref="P:Xamarin.Forms.Layout.Padding" /> of 20.</remarks> </Docs> </Member> + <Member MemberName="CornerRadius"> + <MemberSignature Language="C#" Value="public float CornerRadius { get; set; }" /> + <MemberSignature Language="ILAsm" Value=".property instance float32 CornerRadius" /> + <MemberType>Property</MemberType> + <AssemblyInfo> + <AssemblyVersion>2.0.0.0</AssemblyVersion> + </AssemblyInfo> + <ReturnValue> + <ReturnType>System.Single</ReturnType> + </ReturnValue> + <Docs> + <summary>To be added.</summary> + <value>To be added.</value> + <remarks>To be added.</remarks> + </Docs> + </Member> + <Member MemberName="CornerRadiusProperty"> + <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty CornerRadiusProperty;" /> + <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty CornerRadiusProperty" /> + <MemberType>Field</MemberType> + <AssemblyInfo> + <AssemblyVersion>2.0.0.0</AssemblyVersion> + </AssemblyInfo> + <ReturnValue> + <ReturnType>Xamarin.Forms.BindableProperty</ReturnType> + </ReturnValue> + <Docs> + <summary>To be added.</summary> + <remarks>To be added.</remarks> + </Docs> + </Member> <Member MemberName="HasShadow"> <MemberSignature Language="C#" Value="public bool HasShadow { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance bool HasShadow" /> |