CommunityToolkit/Lottie-Windows

How to set the animatedvisuals from the code behind?

steam3d opened this issue · 1 comments

It is easy from xaml, but how can i set the animation from code behind?

<muxc:AnimatedVisualPlayer x:Name="Modified_Player" AutomationProperties.Name="Lottie animation">
            <animatedvisuals:LottieLogo1_Modified x:Name="Modified_Source_LottieLogo1" />
</muxc:AnimatedVisualPlayer>

I think you should be able to do something like that:

Modified_Player.Source = new LottieLogo1_Modified();