Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border's corner radius malform during expand animation #22499

Open
jnnguyen12 opened this issue May 17, 2024 · 4 comments
Open

Border's corner radius malform during expand animation #22499

jnnguyen12 opened this issue May 17, 2024 · 4 comments
Labels

Comments

@jnnguyen12
Copy link

jnnguyen12 commented May 17, 2024

Description

Border's corner radius does not stay the same, and inconsistently changes during the duration of animation. However, the exact same animation logic and layout works perfectly for Frame.

The red trashcan button using a Frame, which is working perfectly as expected

IMG_0.1.MOV

Using Border:

IMG_0.MOV

Steps to Reproduce

  1. Create the button:
    <Grid VerticalOptions="End" Margin="0, 20, 0, 0" x:Name="WrappingGrid"> <!-- wrapping grid takes up the whole screen -->
        <Border StrokeShape="RoundRectangle 50" HorizontalOptions="Start" x:Name="DeleteSection">
            <Grid IsClippedToBounds="True">
                    <HorizontalStackLayout Spacing="10" Margin="12, 0">
                        <Image Source="trash_can_solid" WidthRequest="20" />
                    </HorizontalStackLayout>
             </Grid>
         </Border>
        <!-- some buttons here -->
    </Grid>
  1. Wire animation logic
 private async void ExpandDelete(object sender, TappedEventArgs e)
 {
		var width = WrappingGrid.Width;
		var expandAnimation = new Animation(
                      v => DeleteSection.WidthRequest = v, DeleteSection.Width, width
                 );

		expandAnimation.Commit(this, "expandSection", 16, 2000, Easing.Default);

                await Task.Delay(2000);
 }

 private async void CollapseDelete(object sender, TappedEventArgs e)
 {
		var width = WrappingGrid.Width;
		var collapseAnimation = new Animation(
                      v => DeleteSection.WidthRequest = v, width, 52
                 );

		collapseAnimation.Commit(this, "collapseSection", 16, 2000, Easing.Default);

                await Task.Delay(2000);
 }

Expected: To work exactly like Frame does.
Actual: Corner radius perpetually stays the same throughout the animation, but shows up morphed and weird.

Link to public reproduction project repository

No response

Version with bug

7.0.49

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

Used Frame instead with a thinner border width

Relevant log output

No response

@jnnguyen12 jnnguyen12 added the t/bug Something isn't working label May 17, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@MAUIoxo
Copy link

MAUIoxo commented May 18, 2024

What happens if you use <Border StrokeShape="RoundRectangle 50, 50, 50, 50" …/>?

@jnnguyen12
Copy link
Author

What happens if you use <Border StrokeShape="RoundRectangle 50, 50, 50, 50" …/>?

It produces the same issue.

@MAUIoxo
Copy link

MAUIoxo commented May 20, 2024

Thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants