Xamarin.Forms
Xamarin.Forms copied to clipboard
[iOS] Avoid Shape animation changing visibility
Description of Change
When initializing a hidden Shape, the initial size is zero, which is then updated to the correct size here: https://github.com/xamarin/Xamarin.Forms/blob/f35ae07a0a8471d255f7a1ebdd51499e10e0a4cb/Xamarin.Forms.Platform.iOS/Shapes/ShapeRenderer.cs#L391
We avoid using the implicit animation doing the changes: https://github.com/xamarin/Xamarin.Forms/blob/f35ae07a0a8471d255f7a1ebdd51499e10e0a4cb/Xamarin.Forms.Platform.iOS/Shapes/ShapeRenderer.cs#L371 And with this PR what is done is to initialize the Shape with the expected size even when it is hidden. By changing the visibility, there is nothing to change.
Issues Resolved
- fixes #13018
API Changes
None
Platforms Affected
- iOS
Behavioral/Visual Changes
None
Before/After Screenshots
None
Testing Procedure
Launch Core Gallery and navigate to the issue 13018. Select one of the ellipses. If render the border shape without any animation, the test has passed (and we have the same behavior in all the platforms).
PR Checklist
- [ ] Targets the correct branch
- [ ] Tests are passing (or failures are unrelated)