Using Lottie in your UWP apps.

Lottie is a library for displaying After Effects animations.

Let’s create a UWP application to try this out.

  • Create a UWP application
  • Add the LottieUWP package via NuGet

The easiest way to get something up and running is, head over to LottieFiles, find an animation and download it (you’ll be downloading a JSON file).

Place the JSON file into the Assets folder of your UWP solution and set the Build Action to Content.

Now, in the MainPage.xaml place the following code with the Grid

<lottieUwp:LottieAnimationView 
   FileName="Assets/success_animation.json" 
   AutoPlay="True" VerticalAlignment="Center" 
   HorizontalAlignment="Center" 
   RepeatCount="0" 
   Width="100" Height="100"/>

The namespace is

xmlns:lottieUwp="using:LottieUWP"

It’s as easy as that.