Description
In iOS, when Maui must redraw a Border, it does so with a 1 frame lag which is evident in two ways:
- The Border is sometimes re-drawn briefly fully square, causing a flash of a square over the corners (rather than the round corners expected)
- The old background color is still visible on update when it is changed for one frame, causing a visual flash of the old color each time
Steps to Reproduce
Reproduction project contains TWO reproduction demonstrations (one for each redraw problem, although they are likely the same underlying issue). To toggle between these projects, open App.xaml.cs and set TestProject here:
enum TestProjects {
testProject1, //==> DEMONSTRATES FLASH AT CORNERS OF LOWER SCREEN "HELLO" BORDER
//AS BORDER IS INITIALLY DRAWN SQUARE (RATHER THAN ROUND) ON THE FIRST "CLICK ME" BUTTON CLICK
testProject2 //==> DEMONSTRATES FLASH OF PRIOR COLOR ON EACH UPDATE
//AS EACH TIME BORDER IS REDRAWN THE COLORATION LAGS ONE FRAME
}
public App() {
//=================================
//SET WHICH TEST PROJECT HERE
//=================================
TestProjects testProject = TestProjects.testProject1;
//=================================
1) TestProject1
This shows a button on screen like this, which when clicked will alter the bottom Border. The bottom Border will flash on the first click made, creating the single frame square border effect shown on the "HELLO" border here:

2) TestProject2
This shows a Border on screen which is automatically toggled by a timer visible or invisible. Each time the background color changes. However, you will see on each update the old color still flashes momentarily before the new one replaces it.
Notes:
Note that the slowest method of building (eg. Debug to device or simulator) is preferred to see the flashes for as long as possible so it is obvious to the eye.
Please note this is also NOT an animation effect - it is a 1 frame drawing lag which is separate from other issues, as animations in test project have been successfully removed by NotAnimatedBorderHandler.cs as per: #18204
@jsuarezruiz I know you were able to fix some of the Windows/Android Border drawing bugs previously reported and it has been appreciated. Any suggestions on a fix or workaround for this one for iOS? Thanks for any help.
Link to public reproduction project repository
https://github.com/jonmdev/iOSBorderShadowAnimationBug
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS
Description
In iOS, when Maui must redraw a Border, it does so with a 1 frame lag which is evident in two ways:
Steps to Reproduce
Reproduction project contains TWO reproduction demonstrations (one for each redraw problem, although they are likely the same underlying issue). To toggle between these projects, open App.xaml.cs and set TestProject here:
1) TestProject1
This shows a button on screen like this, which when clicked will alter the bottom Border. The bottom Border will flash on the first click made, creating the single frame square border effect shown on the "HELLO" border here:
2) TestProject2
This shows a Border on screen which is automatically toggled by a timer visible or invisible. Each time the background color changes. However, you will see on each update the old color still flashes momentarily before the new one replaces it.
Notes:
Note that the slowest method of building (eg. Debug to device or simulator) is preferred to see the flashes for as long as possible so it is obvious to the eye.
Please note this is also NOT an animation effect - it is a 1 frame drawing lag which is separate from other issues, as animations in test project have been successfully removed by NotAnimatedBorderHandler.cs as per: #18204
@jsuarezruiz I know you were able to fix some of the Windows/Android Border drawing bugs previously reported and it has been appreciated. Any suggestions on a fix or workaround for this one for iOS? Thanks for any help.
Link to public reproduction project repository
https://github.com/jonmdev/iOSBorderShadowAnimationBug
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS