Bug 60736 - Button with BorderRadius < 6 on UWP seems to ignore the BorderRadius
Summary: Button with BorderRadius < 6 on UWP seems to ignore the BorderRadius
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on: 60966
  Show dependency tree
Reported: 2017-11-17 17:58 UTC by John Hardman
Modified: 2018-03-20 18:36 UTC (History)
4 users (show)

Tags: UWP, Button, BorderRadius, ac, fr
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description John Hardman 2017-11-17 17:58:44 UTC
On UWP, using XF, the Button drawn as a result of the following code does not have curved "corners". It is as if the BorderRadius is ignored. Values of 6 or greater work, values less than 6 don't.

            Button btnPutFocusOnEntry = new Button
                BorderColor = Color.Red,
                BorderWidth = 1,
                BorderRadius = 5,
                Text = "Put focus on Entry"
Comment 1 Samantha Houts [MSFT] 2018-02-07 23:44:19 UTC
The UWP ButtonRenderer doesn't change its properties if they are set to the default values. The default value of BorderRadius is 5, so if you set the ButtonRadius to 5, it has the same effect as not changing it.

This is obviously not ideal.

Starting with https://github.com/xamarin/Xamarin.Forms/pull/1570, the ButtonRenderer will see the default value of -1 instead of 5, so you'll be able to set your BorderRadius (or CornerRadius, if you update to the non-deprecated property) to 5 and actually see a difference.
Comment 2 John Hardman 2018-02-13 10:12:37 UTC
I don't know why 60966 has been added as a "Depends on" item. It has no relevance in the situation in which I encounter 60736.
Comment 3 Samantha Houts [MSFT] 2018-03-20 18:36:28 UTC
Should be fixed in 2.5.0-sr4. Thanks!