From the course: .NET MAUI: Beyond the Basics

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solution: Animations

Solution: Animations

(energetic music) - [Instructor] In the start code for this chapter is a solution to the problem for the button animation. And so if we open up triggers and tapped animation trigger, here is the animation code. And we did this completely with some basic and custom animations. And so we started by creating a custom animation and passed in V and V is going to be a value that slowly moves between zero and one. And what we're changing is the sender, our button, in this case, the offset of its shadow and that's being set to a new point. And so this new point starts with an offset of 20 and just moves slowly down until it reaches zero. And this will run between zero and one. And that's why we're doing this 20 minus V which is going to be a value between zero and one that we slowly subtract from 20 until it reaches zero. And then I create a task completion source and start up our down animation with commit, giving it a…

Contents