## Frames with border radius preset have this radius reset when their backcolor is changed

_Submitted by a community member on 2017-11-21 12:31 UTC_

If you setup a Frame element with a border radius his radius is removed if you dynamically change the backcolor during app execution.

I won't patronise with a code example for this one, needless to say I have frames that change color dynamically to indicate the importance of the text in an interior label. When the change occurs the border radius is removed. Attempting to re-apply the border radius (during the color change) does not work.

Conversely on the same screen I have another frame with a border radius, but the backcolor of that one is not changed during execution, and thus the border radius is retained throughout.

* * *

_Xamarin Bugzilla comment 1 by Paul DiPietro [MSFT] [MSFT] on 2017-11-21 15:49 UTC_

By "dynamically" I assume you're implying a simple binding changing the value; a basic app/page with a Frame and a set corner radius value doesn't appear to lose that radius when the bound background color is changed. Are you experiencing this on a particular platform? This wasn't made clear.

On a side note, it's absolutely never patronizing to provide a reproduction we can run; this helps us greatly as we can get the same exact code being used by the reporter without having to write one up on our end with guesswork.

* * *

_Xamarin Bugzilla comment 2 by a community member on 2017-11-21 16:02 UTC_

Not even using explicit data binding: I mean just basically altering the backcolor manually in the code-behind, from maybe a button click, or timed loop.

The Frame's style (including an explicit corner radius of 10) is defined in app.xaml, and applied to the Frame in the particular screen's .xaml file. The rest of the frame styling stays put, it just strips the corner radius part of it when we change the backcolor.

I'm experiencing this when compiling to Android v6 onwards. A colleague has confirmed that this also occurs on iOS, however I have not seen this myself, as I don't explicitly work on the iOS side, so I can't honestly confirm that one with my own eyes.

* * *

_Xamarin Bugzilla comment 3 by a community member on 2017-11-28 14:25 UTC_

I've knocked up a quick test case: here's a link to a Dropbox zip file containing the source code to illustrate the issue, the "attach" option keeps refusing to allow me to put it there:

* * *

_Xamarin Bugzilla comment 4 by a community member on 2018-03-16 10:02 UTC_

The problem only appears with Android. When debugging, the radius value is still the same but visually lost. 
Could you find any work-around?

* * *

_Xamarin Bugzilla comment 5 by a community member on 2018-03-16 14:26 UTC_

I'm afraid not, I resorted to eliminating the need for the border.

I would speculate that a size changed event, triggered on some control within the page, that changed the radius to zero and then back to its required curve value might re-establish the radius properly, however that's just a guess off the top of my head, and could well be nonsense.

* * *

_Xamarin Bugzilla comment 6 by a community member on 2018-05-16 16:37 UTC_

My team is seeing this same exact behavior as well. If simply set a static background color, the CornerRadius property works as expected. However, we need the backgroundColor bound to a property of the object being represented in the UI. We have also tried re-setting the CornerRadius to 5 again in the same DataTrigger we use to set the backgroundColor, but the corners stay square. 

As @Max reported, this happens only on Android. Would really love to see a fix for this.

* * *

<br />

_Reference: <https://bugzilla.xamarin.com/show_bug.cgi?id=60787>_