我有一个 AnimationView Lottie 一个框架,它应该加载一个放在我的资源文件夹中的文件沙马林。形式项目(一)
AnimationView
Lottie
<forms:AnimationView x:Name="AnimationView" Animation="SharpLibrary.Forms.Assets.Images.WineGlass.json" Loop="True" AutoPlay="True" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" />
但它似乎无法解决 Animation 属性,因此它将不显示动画。如果我把文件放到资源文件夹里然后说 Animation="WineGlass.json" 它起作用了。
Animation
Animation="WineGlass.json"
有没有办法从EmbeddedResource加载它,还是不可能?
它和我在一起工作 首先,如果愿意,可以将json文件放在文件夹或共享文件夹中
Animation="Images.loading.json"
在c代码处
animationView.AnimationSource = AnimationSource.EmbeddedResource;