Skip to content

Commit 9e21112

Browse files
committed
Updated readme.
1 parent 5f96d9f commit 9e21112

File tree

1 file changed

+54
-7
lines changed

1 file changed

+54
-7
lines changed

README.md

+54-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PS.: Screen cast by: http://recordit.co/
1717

1818
Add LottieSharp to your application:
1919

20-
```PM> Install-Package LottieSharp -Version 2.1.0```
20+
```PM> Install-Package LottieSharp -Version 2.2.0```
2121

2222
Reference LottieSharp in your XAML Window/Page/UserControl:
2323

@@ -47,6 +47,52 @@ With `images/my-resource-animation.json` Resource in the application project fil
4747
RepeatCount="-1" />
4848
```
4949

50+
When a lottie animation is small and you need it bigger, there's no need to edit the lottie file.
51+
Now we apply a scale to it.
52+
```
53+
<lottie:LottieAnimationView
54+
Width="200"
55+
Height="300"
56+
HorizontalAlignment="Center"
57+
VerticalAlignment="Center"
58+
AutoPlay="True"
59+
ResourcePath="pack://application:,,,/images/my-resource-animation.json"
60+
RepeatCount="-1">
61+
<lottie:LottieAnimationView.AnimationScale>
62+
<transforms:CenterTransform ScaleX="1.5" ScaleY="1.5" />
63+
</lottie:LottieAnimationView.AnimationScale>
64+
</lottie:LottieAnimationView>
65+
```
66+
67+
CenterTransform scales the animation within its center automatically.
68+
If you need a different position use the AnimationTransformBase.
69+
```
70+
<lottie:LottieAnimationView
71+
Width="200"
72+
Height="300"
73+
HorizontalAlignment="Center"
74+
VerticalAlignment="Center"
75+
AutoPlay="True"
76+
ResourcePath="pack://application:,,,/images/my-resource-animation.json"
77+
RepeatCount="-1">
78+
<lottie:LottieAnimationView.AnimationScale>
79+
<transforms:AnimationTransformBase
80+
CenterX="0"
81+
CenterY="1"
82+
ScaleX="2"
83+
ScaleY="2" />
84+
</lottie:LottieAnimationView.AnimationScale>
85+
</lottie:LottieAnimationView>
86+
```
87+
88+
89+
90+
91+
### Version 2.2.0
92+
Adds support for scaling the animation.
93+
Adds support to AnyCPU.
94+
Updated to latest SkiaSharp references.
95+
5096
### Version 2.1.0
5197
Adds support for loading a Resource stream with a `pack://application` URI. Using both `FileName` and `ResourcePath` properties is ambigous.
5298

@@ -57,13 +103,14 @@ Fixed issue with animation details not being displayed in databinding.
57103

58104
### Properties, Methods and Events
59105

60-
| Properties | Values | Description |
106+
| Properties | Values | Description |
61107
| --- | --- | --- |
62-
| AutoPlay | True, False | When true, the animation file is automatically played and it is loaded |
63-
| FileName | string | Path to the Lottie file. This property can be used in databind (see demo app) |
64-
| ResourcePath| string | Resource path to the Lottie file. This property can be used in databind (see demo app splash screen) |
65-
| RepeatCount | -1..N | How many times the animation will repeat after once played. The default is 0, meaning it doesn't repeat. -1 means it repeats forever. |
66-
| IsPlaying | True, False | Represents the current aninaation status. |
108+
| AutoPlay | True, False | When true, the animation file is automatically played and it is loaded |
109+
| FileName | string | Path to the Lottie file. This property can be used in databind (see demo app) |
110+
| ResourcePath | string | Resource path to the Lottie file. This property can be used in databind (see demo app splash screen) |
111+
| RepeatCount | -1..N | How many times the animation will repeat after once played. The default is 0, meaning it doesn't repeat. -1 means it repeats forever. |
112+
| IsPlaying | True, False | Represents the current aninaation status. |
113+
| AnimationScale |AnimationTransformBase | Applies a custom scale to the loaded lottie animation. See CenterTransform above |
67114

68115

69116
| Events | Description |

0 commit comments

Comments
 (0)