[UWP] fixes crash after reset corner radius (#6744)
authorPavel Yakovlev <v-payako@microsoft.com>
Thu, 4 Jul 2019 00:03:13 +0000 (03:03 +0300)
committerSamantha Houts <samhouts@users.noreply.github.com>
Thu, 4 Jul 2019 00:03:13 +0000 (17:03 -0700)
Xamarin.Forms.Platform.UAP/FormsButton.cs

index 0ed93de..adb4526 100644 (file)
@@ -71,9 +71,11 @@ namespace Xamarin.Forms.Platform.UWP
 
                void UpdateBorderRadius()
                {
-
                        if (_contentPresenter != null)
-                               _contentPresenter.CornerRadius = new Windows.UI.Xaml.CornerRadius(BorderRadius);
+                       {
+                               var radius = BorderRadius == -1 ? 0 : BorderRadius;
+                               _contentPresenter.CornerRadius = new Windows.UI.Xaml.CornerRadius(radius);
+                       }
                }
        }
 }
\ No newline at end of file