From 7e6ea40a3791618dca2038fa4221bb1dee9f280e Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 25 Mar 2019 18:04:18 +0300 Subject: [PATCH] CheckBox animation update --- InputKit/Shared/Controls/CheckBox.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InputKit/Shared/Controls/CheckBox.cs b/InputKit/Shared/Controls/CheckBox.cs index bdf770a..b0655df 100644 --- a/InputKit/Shared/Controls/CheckBox.cs +++ b/InputKit/Shared/Controls/CheckBox.cs @@ -20,7 +20,7 @@ public partial class CheckBox : StatefulStackLayout, IValidatable BorderColor = Color.Black, TextColor = (Color)Label.TextColorProperty.DefaultValue, Size = 25, - CornerRadius = -1, + CornerRadius = 4, FontSize = 14, }; @@ -331,6 +331,8 @@ public static void ApplyIsChecked(CheckBox checkBox, bool isChecked) public static async void ApplyIsPressed(CheckBox checkBox, bool isPressed) { await checkBox.frmBackground.ScaleTo(isPressed ? .8 : 1, 50, Easing.BounceIn); + var radiusVal = isPressed ? checkBox.frmBackground.CornerRadius * 2f : checkBox.CornerRadius; + checkBox.frmBackground.CornerRadius = radiusVal; } #endregion