|Summary:||Frames with border radius preset have this radius reset when their backcolor is changed|
|Severity:||normal||CC:||jas, jon_bachelor, maxima078, paul.dipietro|
|Tags:||Is this bug a regression?:||No|
|Last known good build:|
Description drew.robey 2017-11-21 12:31:17 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.
Comment 1 Paul DiPietro [MSFT] 2017-11-21 15:49:18 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.
Comment 2 drew.robey 2017-11-21 16:02:46 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.
Comment 3 drew.robey 2017-11-28 14:25:34 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: https://www.dropbox.com/s/tm0qmmdhiv57xr9/Testcase.zip?dl=0
Comment 4 Max 2018-03-16 10:02:14 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?
Comment 5 drew.robey 2018-03-16 14:26:52 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.
Comment 6 Jon Bachelor 2018-05-16 16:37:32 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.