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 2

Creating custom animations, part 2 - .NET MAUI Tutorial

From the course: .NET MAUI: Beyond the Basics

Creating custom animations, part 2

- We're going to continue creating our animation from the last video. Before, we had created an extension method class that could take in any visual element and run the animation. Now we're going to implement it. And we're going to start by creating an animation. So we'll go "var" and we'll call it "popAnimation". And this is going to be equal to new. And the animation class is the basis for our custom animation. And we'll give it a couple parameters. So it's going to pass in a double pure call and we'll call a custom method. So we'll call "performpopAnimation." This method we'll make in a couple seconds and we'll pass it in self which is a reference to our visual element. We'll pass it in v, which is the input parameter. We'll give it the start height. This is the start height of our visual element and the start width. And this is the starting width, and we'll close that up and we'll give it a range of what to run it…

Contents