AnimationBuilder.Create Method

Definition

Creates a new AnimationBuilder instance to setup an animation schedule. This can be used as the entry point to construct a custom animation sequence.

For instance:
AnimationBuilder.Create()<br />
    .Opacity(from: 0, to: 1)<br />
    .Translation(Axis.X, from: -40, to: 0)<br />
    .Start(MyButton);

Configured AnimationBuilder instances are also reusable, meaning that the same one can be used to start an animation sequence on multiple elements as well.

For instance:
var animation = AnimationBuilder.Create().Opacity(0, 1).Size(1.2, 1);<br /><br />
animation.Start(MyButton);<br />
animation.Start(MyGrid);

Alternatively, the AnimationSet type can be used to configure animations directly from XAML. The same AnimationBuilder APIs will still be used behind the scenes to handle animations.

public static Microsoft.Toolkit.Uwp.UI.Animations.AnimationBuilder Create ();
static member Create : unit -> Microsoft.Toolkit.Uwp.UI.Animations.AnimationBuilder
Public Shared Function Create () As AnimationBuilder

Returns

An empty AnimationBuilder instance to use to construct an animation sequence.

Applies to