ConnectedAnimationService.GetAnimation(String) Method

Definition

Returns the animation with the specified key.

public:
 virtual ConnectedAnimation ^ GetAnimation(Platform::String ^ key) = GetAnimation;
ConnectedAnimation GetAnimation(winrt::hstring const & key);
public ConnectedAnimation GetAnimation(string key);
Public Function GetAnimation (key As String) As ConnectedAnimation

Parameters

key
String

The key for the animation.

Returns

ConnectedAnimation

The animation with the specified key; or null if no animation has been prepared for that key, or if the animation is no longer active.

Remarks

A ConnectedAnimation is no longer active when:

  • It has been canceled.
  • The animation has completed.
  • The source has expired (@"Microsoft.UI.Xaml.Media.Animation.ConnectedAnimationService.PrepareToAnimate(System.String,Microsoft.UI.Xaml.UIElement)?text=PrepareToAnimate" was called and then the animation was not started for ~2 seconds).

Applies to