FadeAnimation
The FadeAnimation
provides the ability to animate the opacity of a VisualElement
from its original opacity to a specified new opacity and then back to the original.
Syntax
XAML
For use within XAML the FadeAnimation
must be used in conjunction with the AnimationBehavior
.
C#
The FadeAnimation
can be used as follows in C#:
public async void Animate()
{
var label = new Label();
var fadeAnimation = new FadeAnimation();
await fadeAnimation.Animate(label);
}
Examples
You can find an example of this animation in action in the .NET MAUI Community Toolkit Sample Application.
API
You can find the source code for FadeAnimation
over on the .NET MAUI Community Toolkit GitHub repository.
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
.NET MAUI Community Toolkit