Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The .NET Multi-platform App UI (.NET MAUI) animation classes target different properties of visual elements, with a typical basic animation progressively changing a property from one value to another over a period of time.
For further information on Animations please refer to the .NET MAUI documentation.
The .NET MAUI Community Toolkit provides a collection of pre-built, reusable animations that can be used in both C# and XAML. Here are the animations provided by the toolkit:
Behavior | Description |
---|---|
FadeAnimation |
The FadeAnimation provides the ability to animate the opacity of a VisualElement from it's original opacity, to a specified new opacity and then back to the original. |
All animations provided by the .NET MAUI Community Toolkit inherit from our BaseAnimation
class. In order to create any custom animation of your choosing you can do the same.
The following example shows how to change the BackgroundColor
of a VisualElement
using our very own BackgroundColorTo
extension method.
using CommunityToolkit.Maui.Extensions;
class PaintTheRainbowAnimation : BaseAnimation
{
public override async Task Animate(VisualElement view)
{
await view.BackgroundColorTo(Colors.Red);
await view.BackgroundColorTo(Colors.Orange);
await view.BackgroundColorTo(Colors.Yellow);
await view.BackgroundColorTo(Colors.Green);
await view.BackgroundColorTo(Colors.Blue);
await view.BackgroundColorTo(Colors.Indigo);
await view.BackgroundColorTo(Colors.Violet);
}
}
.NET MAUI Community Toolkit feedback
.NET MAUI Community Toolkit is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Create a UI in a .NET MAUI app by using XAML - Training
Learn how to design a UI for a .NET MAUI app using XAML.