Skip to content

marik91/LottieSharp

 
 

Repository files navigation

LottieSharp

Logo C# (WPF) port of Lottie (https://github.com/airbnb/lottie-android) based on .NET Framework 4.6.1 using sharpdx (http://sharpdx.org/)

Usage

PM> Install-Package LottieSharp -Version 1.0.0

  • Install from nuget: LottieSharp;

  • Import into your xaml the library

    xmlns:lottieSharp="clr-namespace:LottieSharp;assembly=LottieSharp"

  • Now you can include the control in your layout

<lottieSharp:LottieAnimationView 
    x:Name="LottieAnimationView" 
    DefaultCacheStrategy="None" 
    FileName="Assets/Spider Loader.json" AutoPlay="True" 
    VerticalAlignment="Center" 
    HorizontalAlignment="Center"/>

The FileName property points to an After Effects animation file. You can write the filename in xaml like shown or bind to a property in your viewmodel.

The AutoPlay property indicates if the animation starts when the usercontrol is loaded.

There are many free animations at: LottieFiles

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%