ConnectedAnimation ConnectedAnimation ConnectedAnimation ConnectedAnimation Class

Definition

Represents an animation that simultaneously animates the exit of one element and the entrance of another element.

public : sealed class ConnectedAnimation : IConnectedAnimation, IConnectedAnimation2
struct winrt::Windows::UI::Xaml::Media::Animation::ConnectedAnimation : IConnectedAnimation, IConnectedAnimation2
public sealed class ConnectedAnimation : IConnectedAnimation, IConnectedAnimation2
Public NotInheritable Class ConnectedAnimation Implements IConnectedAnimation, IConnectedAnimation2
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

A ConnectedAnimation instance is returned by the ConnectedAnimationService.GetAnimation and ConnectedAnimationService.PrepareToAnimate methods.

When you call TryStart, the element you pass into the method should have its size defined in layout. This means that either the size of the element should be set in markup, or the content of the element should be fully populated, so that its size can be calculated by the XAML framework. If the layout is part of a ListView or GridView item with bound properties, you might have to manually update the content to prepare for the animation because bindings can be updated asynchronously.

There is a known limitation where ConnectedAnimation does not work well with theme transitions that have a translation component, including NavigationThemeTransition and EntranceThemeTransition. We recommend that you remove these transitions, or suppress the navigation using SuppressNavigationTransitionInfo, when you create an experience with ConnectedAnimation.

See the Connected animation sample for a complete example of ConnectedAnimation.

Properties

IsScaleAnimationEnabled IsScaleAnimationEnabled IsScaleAnimationEnabled IsScaleAnimationEnabled

Gets or sets a value that indicates whether the scale component of the connected animation should be used.

Methods

Cancel() Cancel() Cancel() Cancel()

Stops the connected animation.

SetAnimationComponent(ConnectedAnimationComponent, ICompositionAnimationBase) SetAnimationComponent(ConnectedAnimationComponent, ICompositionAnimationBase) SetAnimationComponent(ConnectedAnimationComponent, ICompositionAnimationBase) SetAnimationComponent(ConnectedAnimationComponent, ICompositionAnimationBase)

Sets a custom CompositionAnimation to change the motion of a particular part of the connected animation.

TryStart(UIElement) TryStart(UIElement) TryStart(UIElement) TryStart(UIElement)

Attempts to start the animation.

TryStart(UIElement, IIterable<UIElement>) TryStart(UIElement, IIterable<UIElement>) TryStart(UIElement, IIterable<UIElement>) TryStart(UIElement, IIterable<UIElement>)

Attempts to start the animation on the destination element and specified secondary elements.

Events

Completed Completed Completed Completed

Occurs when the animation is finished.

See Also