-
Notifications
You must be signed in to change notification settings - Fork 42
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
[Feature] AnimatedCornerRadius #240
Comments
Hello, 'AbdAlghaniAlbiek! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
Thanks for the example @AbdAlghaniAlbiek, did you have a scenario in mind where you were trying to animate the corners of an element? @Sergio0694 thoughts on this? Can we not animate them in another method already? |
@michael-hawker In Telegram when you swip an item from your contracts list, the corners of swiped item will be rounded like Screenrecorder-2021-12-09-21-52-22-114.mp4The problem is that there isn't a "DoubleAnimation" that can make animate each of corner of this control in AnimationBuilder |
Yes, and it's not a coincidence that this animation type was removed on UWP: it's absolutely terrible for performance. It's even worse than regular double animations targeting properties such as eg. "Opacity". If we want to add a way to animate corner radiai, we should do that with a proper composition animation targeting the right property on the shadow visual, if there's one. Also, side note: you can animate what you're describing with |
hmm .. You mean the same reason that make you deleting light animation -> for performance reasons If you don't have the desire to implement it in the toolkit, It's ok I'll close this issue .. you always know what is the best for this toolkit 👍👍 |
Not really. All light effects are pretty fast as they run on the GPU. We also still have them in the new Microsoft Store 🙂
I didn't say we shouldn't add this. I just said if we want to add this, this is not the correct implementation for this. |
Hi @Sergio0694 hope you have nice day. I'm sorry for bother you, but I was searching for a solution for this problem then I found this repo from the awesome @ratishphilip. It'll be great way to animate the corners of any shape that made by the same way that "Squircle" is made of , and actually I think @ratishphilip made pull request for implementing his lib here |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the problem this feature would solve
I have made a TemplatedControl that have 4 new properties (TopLeftCorner, TopRightCorner, BottomLeftCorner, BottomRightCorner) and each of them control in the radius of corner that associated with.
And the purpose of doing this that in WPF there type of animation called: "ThicknessAnimation" and this animation provide me the ability to animate the properties that are from thickness class like: (margin, padding, borderThickness ...) and because this animation isn't available in UWP the solutions simply was making a dependency property for each paramerter of the thickness and animate them all such as: (make four properties for the Margin => LeftMargin, TopMargin, RightMargin, BelowMawrgin, and animate all of them or some of them depending on your needs in one storyboard) and in my sample here I made animation for the corners of border
The generic xaml for this TemplatedControl :
And .cs file
and I define this control in MainPage and put the storyboard inside the same control and I made this storyboard ""Begin"" in code behind:
But then I think to make this properties as Attached properties to be possible to any one to implement it directly in any dependency object but then I figured out that It is impossible to animate attached properties, so I need your help to choice what is the better choice to deal with (making entirely new control to animate the corners OR there is some way else in behaviors and AnimationBuilder that can do it ????)
Describe the solution
Making Animating CornerRadius possible using custom control
Describe alternatives you've considered
It's a good idea to add this type of animation (CornerRadiusAnimation or ThicknessAnimation) to AnimationBuilder if this possibole
Additional context & Screenshots
recordedVideo2021-12-07-232948.mp4
The text was updated successfully, but these errors were encountered: