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.

Creating custom animations, part 1

Creating custom animations, part 1 - .NET MAUI Tutorial

From the course: .NET MAUI: Beyond the Basics

Creating custom animations, part 1

- We've talked about out of the box animations, but MAUI has provided us a way to animate just about any visual property that impacts any view, layout, or page. To do this, they provided an animation class. This class only requires a few things: the starting and ending value of what we want to animate, and a function to do the animation. This function takes in a double that represents one point in the animation, starting with a start value, and ending at an end value. This function is called over and over again, and we use the current value to do a custom function to calculate the value of whatever property we want, based on that input. This allows us great flexibility in doing animations. The animation class does have a couple of function we can use. Commit to run the animation, we can cancel it using the cancel function, passing the name we gave in animation, and the IsEnabled function lets us know if animations…

Contents