Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,955 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have used lottie json animation in xaml uwp using "CommunityToolkit.WinUI.Lottie" and "AnimatedVisualPlayer".
But for dark theme I can not see the lottie animation as the color is fixed. How can we dynamically change color of lottie animation?
<Page x:Class="Lottie_Test.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Lottie_Test"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:lottie="using:CommunityToolkit.WinUI.Lottie"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="White">
<Border Background="Transparent"
BorderThickness="3"
BorderBrush="Transparent"
Width="30"
Height="30"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<muxc:AnimatedVisualPlayer x:Name="VoiceWaveLottiePlayer"
AutomationProperties.Name="Lottie animation"
AutoPlay="True">
<lottie:LottieVisualSource x:Name="LottieJsonSource"
Options="All"
UriSource="ms-appx:///Assets/lottie_equalizer.json" />
</muxc:AnimatedVisualPlayer>
</Border>
</Grid>
</Page>