├── .gitignore
├── LICENSE
├── README.md
├── demo
├── XFAnimationDemo.Android
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.designer.cs
│ │ ├── layout
│ │ │ ├── Tabbar.axml
│ │ │ └── Toolbar.axml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── icon.xml
│ │ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── Icon.png
│ │ │ └── launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ │ ├── icon.png
│ │ │ └── launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── Icon.png
│ │ │ └── launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── Icon.png
│ │ │ └── launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── Icon.png
│ │ │ └── launcher_foreground.png
│ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ └── XFAnimationDemo.Android.csproj
├── XFAnimationDemo.iOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ └── Icon87.png
│ │ └── Star.imageset
│ │ │ ├── Contents.json
│ │ │ ├── star@2x.png
│ │ │ └── star@3x.png
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ └── LaunchScreen.storyboard
│ └── XFAnimationDemo.iOS.csproj
├── XFAnimationDemo.sln
└── XFAnimationDemo
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Controls
│ ├── ActivityIndicatorDemo.xaml
│ ├── ActivityIndicatorDemo.xaml.cs
│ ├── BoxViewDemo.xaml
│ ├── BoxViewDemo.xaml.cs
│ ├── ButtonDemo.xaml
│ ├── ButtonDemo.xaml.cs
│ ├── DatePickerDemo.xaml
│ ├── DatePickerDemo.xaml.cs
│ ├── EditorDemo.xaml
│ ├── EditorDemo.xaml.cs
│ ├── EntryDemo.xaml
│ ├── EntryDemo.xaml.cs
│ ├── FrameDemo.xaml
│ ├── FrameDemo.xaml.cs
│ ├── GridDemo.xaml
│ ├── GridDemo.xaml.cs
│ ├── LabelDemo.xaml
│ ├── LabelDemo.xaml.cs
│ ├── LayoutDemo.xaml
│ ├── LayoutDemo.xaml.cs
│ ├── ListViewDemo.xaml
│ ├── ListViewDemo.xaml.cs
│ ├── PickerDemo.xaml
│ ├── PickerDemo.xaml.cs
│ ├── ProgressBarDemo.xaml
│ ├── ProgressBarDemo.xaml.cs
│ ├── SliderDemo.xaml
│ ├── SliderDemo.xaml.cs
│ ├── StackLayoutDemo.xaml
│ ├── StackLayoutDemo.xaml.cs
│ ├── SwitchDemo.xaml
│ ├── SwitchDemo.xaml.cs
│ ├── TimePickerDemo.xaml
│ ├── TimePickerDemo.xaml.cs
│ ├── ViewDemo.xaml
│ ├── ViewDemo.xaml.cs
│ ├── VisualElementDemo.xaml
│ └── VisualElementDemo.xaml.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── MainPageViewModel.cs
│ ├── MasterPage.xaml
│ ├── MasterPage.xaml.cs
│ ├── MasterPageItem.cs
│ ├── MasterPageViewModel.cs
│ ├── RunAnimationCommand.cs
│ └── XFAnimationDemo.csproj
└── src
├── Controls
├── AbsoluteLayout
│ └── AbsoluteLayoutBoundsRectangleAnimation.cs
├── ActivityIndicator
│ └── ActivityIndicatorColorAnimation.cs
├── AnimationBase.cs
├── BoxView
│ ├── BoxViewColorAnimation.cs
│ └── BoxViewCornerRadiusAnimation.cs
├── Button
│ ├── ButtonBorderColorAnimation.cs
│ ├── ButtonBorderWidthDoubleAnimation.cs
│ ├── ButtonCornerRadiusAnimation.cs
│ ├── ButtonFontSizeDoubleAnimation.cs
│ ├── ButtonPaddingThicknessAnimation.cs
│ └── ButtonTextColorAnimation.cs
├── DatePicker
│ ├── DatePickerFontSizeDoubleAnimation.cs
│ └── DatePickerTextColorAnimation.cs
├── Editor
│ ├── EditorFontSizeDoubleAnimation.cs
│ ├── EditorPlaceholderColorAnimation.cs
│ └── EditorTextColorAnimation.cs
├── Entry
│ ├── EntryFontSizeDoubleAnimation.cs
│ ├── EntryPlaceholderColorAnimation.cs
│ └── EntryTextColorAnimation.cs
├── Frame
│ ├── FrameBorderColorAnimation.cs
│ ├── FrameCornerRadiusAnimation.cs
│ └── FrameOutlineColorAnimation.cs
├── Grid
│ ├── GridColumnSpacingDoubleAnimation.cs
│ └── GridRowSpacingDoubleAnimation.cs
├── Label
│ ├── LabelFontSizeDoubleAnimation.cs
│ ├── LabelLineHeightDoubleAnimation.cs
│ ├── LabelTextColorAnimation.cs
│ └── ListViewSeparatorColorAnimation.cs
├── Layout
│ └── LayoutPaddingThicknessAnimation.cs
├── ListView
│ └── ListViewRowHeightDoubleAnimation.cs
├── Picker
│ ├── PickerFontSizeDoubleAnimation.cs
│ └── PickerTextColorAnimation.cs
├── ProgressBar
│ └── ProgressBarColorAnimation.cs
├── Slider
│ ├── SliderMaximumTrackColorAnimation.cs
│ ├── SliderMinimumTrackColorAnimation.cs
│ └── SliderThumbColorAnimation.cs
├── StackLayout
│ └── StackLayoutSpacingDoubleAnimation.cs
├── Switch
│ └── SwitchOnColorAnimation.cs
├── TableView
│ └── TableViewRowHeightIntAnimation.cs
├── TimePicker
│ ├── TimePickerFontSizeDoubleAnimation.cs
│ └── TimePickerTextColorAnimation.cs
├── View
│ └── MarginThicknessAnimation.cs
└── VisualElement
│ ├── BackgroundColorAnimation.cs
│ ├── HeightRequestDoubleAnimation.cs
│ ├── OpacityDoubleAnimation.cs
│ └── WidthRequestDoubleAnimation.cs
├── Utils
├── AnimationUtil.cs
└── EasingValueConverter.cs
├── Xamarin.Forms.AnimationsPack.csproj
└── Xamarin.Forms.AnimationsPack.sln
/.gitignore:
--------------------------------------------------------------------------------
1 | # Autosave files
2 | *~
3 |
4 | # build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 | .vs/
31 |
32 | # Mac bundle stuff
33 | *.dmg
34 | *.app
35 |
36 | # resharper
37 | *_Resharper.*
38 | *.Resharper
39 |
40 | # dotCover
41 | *.dotCover
42 |
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 takeshi noguchi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Xamarin.Forms.AnimationsPack
2 | Xamarin.Forms.AnimationsPack is Animation library for Xamarin.Forms.
3 | This library contains [Animations](#animation-list).
4 |
5 | # How to Install
6 | Install from NuGet.
7 | ```
8 | > Install-Package Xamarin.Forms.AnimationsPack
9 | ```
10 | [https://www.nuget.org/packages/Xamarin.Forms.AnimationsPack](https://www.nuget.org/packages/Xamarin.Forms.AnimationsPack)
11 |
12 | # Demo Project
13 | Demo project applying this library is located to the following path of this repository.
14 |
15 | ```
16 | demo/XFAnimationDemo.sln
17 | ```
18 |
19 | Let's build and run demo application!
20 |
21 | # How to Use
22 | ## Namespace Declaration
23 | ~~~XAML
24 | xmlns:animationsPack="clr-namespace:Xamarin.Forms.AnimationsPack;assembly=Xamarin.Forms.AnimationsPack"
25 | ~~~
26 |
27 | ## Apply Animation
28 | ### EventTrigger
29 | Simple code sample for Xamrin.Forms.Entry control.
30 | ~~~XAML
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ~~~
41 |
42 | This example shows following animation.
43 | - Animation starts when Entry is focused.
44 | - `TextColor` property : **Black** > **Lime**, **1000** millisecond, **Linear** easing-function
45 | - `FontSize` property : *20* > **30**, **3000** millisecond, *Linear* easing-function
46 | - `BackgroundColor` property : *Gray* > **Teal**, *1000* millisecond, **CubicInOut** easing-function
47 |
48 | ### DataTrigger
49 | In the DataTrigger sample, we assume that BindingContext is already set, and that ViewModel contains `bool` type property named `IsAnimationWorking`.
50 |
51 | ```XAML
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | ```
70 |
71 | This example shows following animation.
72 | - Animation starts when Button is clicked (`IsAnimationWorking` is set to `true` when Button is clicked).
73 | - `TextColor` property : **Black** > **Yellow**, **1000** millisecond, **BounceIn** easing-function
74 | - `FontSize` property : *20* > **50**, **2000** millisecond, *Linear* easing-function
75 | - `BackgroundColor` property : *Gray* > **Red**, *1000* millisecond, **SinIn** easing-function
76 | - After 2 seconds, another animation starts (`IsAnimationWorking` is force change to `false` after 2 seconds).
77 | - `TextColor` property : *Yellow* > **Black**, *1000* milliseconds, *Linear* easing-function
78 | - `FontSize` property : *50* > **20**, *1000* milliseconds, *Linear* easing-function
79 | - `BackgroundColor` property : *Red* > **Gray**, *1000* milliseconds, *Linear* easing-function
80 |
81 | Note : **(Bold Property)** is explicitly specified property. *(Italic property)* is unspecified and apply to [default-value](#common-property) property
82 |
83 | # Dependencies
84 | Xamarin.Forms : 3.2.0.871581
85 |
86 | # Common Property
87 | ~~~C#
88 | public T From { get; set; } = default(T); // Animation starting value
89 | public T To { get; set; } = default(T); // Animation ending value
90 | public uint Length { get; set; } = 1000; // Animation Length (milliseconds)
91 | public string Easing { get; set; } = "Linear"; // Animation EasingFunction name
92 | ~~~
93 |
94 | - From : Optional
95 | - If From do not set, then use current property value
96 | - To : **Required**
97 | - Length : Optional
98 | - Easing : Optional
99 | - https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.easing?view=xamarin-forms
100 |
101 | # Animation List
102 |
103 |
104 | Property Owner |
105 | Property |
106 | Animation Class Name |
107 | T |
108 | Implemented |
109 |
110 |
111 | VisualElement |
112 | BackgroundColor |
113 | BackgroundColorAnimation |
114 | Color |
115 | ✓ |
116 |
117 |
118 | Opacity |
119 | OpacityDoubleAnimation |
120 | double |
121 | ✓ |
122 |
123 |
124 | HeightRequest |
125 | HeightRequestDoubleAnimation |
126 | double |
127 | ✓ |
128 |
129 |
130 | WidthRequest |
131 | WidthRequestDoubleAnimation |
132 | double |
133 | ✓ |
134 |
135 |
136 | Rotation |
137 | (RotationTo) |
138 | double |
139 | - |
140 |
141 |
142 | Scale |
143 | (ScaleTo) |
144 | double |
145 | - |
146 |
147 |
148 | View |
149 | Margin |
150 | MarginThicknessAnimation |
151 | Thickness |
152 | ✓ |
153 |
154 |
155 | Label |
156 | FontSize |
157 | LabelFontSizeDoubleAnimation |
158 | double |
159 | ✓ |
160 |
161 |
162 | TextColor |
163 | LabelTextColorAnimation |
164 | Color |
165 | ✓ |
166 |
167 |
168 | LineHeight |
169 | LabelLineHeightDoubleAnimation |
170 | double |
171 | ✓ |
172 |
173 |
174 | ActivityIndicator |
175 | Color |
176 | ActivityIndicatorColorAnimation |
177 | Color |
178 | △ |
179 |
180 |
181 | BoxView |
182 | Color |
183 | BoxViewColorAnimation |
184 | Color |
185 | ✓ |
186 |
187 |
188 | CornerRadius |
189 | BoxViewCornerRadiusAnimation |
190 | CornerRadius |
191 | ✓ |
192 |
193 |
194 | Button |
195 | BorderColor |
196 | ButtonBorderColorAnimation |
197 | Color |
198 | ✓ |
199 |
200 |
201 | BorderWidth |
202 | ButtonBorderWidthDoubleAnimation |
203 | double |
204 | ✓ |
205 |
206 |
207 | CornerRadius |
208 | ButtonCornerRadiusAnimation |
209 | CornerRadius |
210 | ✓ |
211 |
212 |
213 | FontSize |
214 | ButtonFontSizeDoubleAnimation |
215 | double |
216 | ✓ |
217 |
218 |
219 | Padding |
220 | ButtonPaddingThicknessAnimation |
221 | Thickness |
222 | ✓ |
223 |
224 |
225 | TextColor |
226 | ButtonTextColorAnimation |
227 | Color |
228 | ✓ |
229 |
230 |
231 | DatePicker |
232 | FontSize |
233 | DatePickerFontSizeDoubleAnimation |
234 | double |
235 | ✓ |
236 |
237 |
238 | TextColor |
239 | DatePickerTextColorAnimation |
240 | Color |
241 | ✓ |
242 |
243 |
244 | Layout |
245 | Padding |
246 | LayoutPaddingThicknessAnimation |
247 | Thickness |
248 | ✓ |
249 |
250 |
251 | AbsoluteLayout |
252 | LayoutBounds |
253 | AbsoluteLayoutBoundsRectangleAnimation |
254 | Rectangle |
255 | ? |
256 |
257 |
258 | Grid |
259 | ColumnSpacing |
260 | GridColumnSpacingDoubleAnimation |
261 | double |
262 | ✓ |
263 |
264 |
265 | RowSpacing |
266 | GridRowSpacingDoubleAnimation |
267 | double |
268 | ✓ |
269 |
270 |
271 | StackLayout |
272 | Spacing |
273 | StackLayoutSpacingDoubleAnimation |
274 | double |
275 | ✓ |
276 |
277 |
278 | Picker |
279 | TextColor |
280 | PickerTextColorAnimation |
281 | Color |
282 | ✓ |
283 |
284 |
285 | FontSize |
286 | PickerFontSizeDoubleAnimation |
287 | double |
288 | ✓ |
289 |
290 |
291 | ProgressBar |
292 | ProgressColor |
293 | ProgressBarColorAnimation |
294 | Color |
295 | ✓ |
296 |
297 |
298 | Slider |
299 | MaximumTrackColor |
300 | SliderMaximumTrackColorAnimation |
301 | Color |
302 | ✓ |
303 |
304 |
305 | MinimumTrackColor |
306 | SliderMinimumTrackColorAnimation |
307 | Color |
308 | ✓ |
309 |
310 |
311 | ThumbColor |
312 | SliderThumbColorAnimation |
313 | Color |
314 | ✓ |
315 |
316 |
317 | Switch |
318 | OnColor |
319 | SwitchOnColorAnimation |
320 | Color |
321 | ✓ |
322 |
323 |
324 | TableView |
325 | RowHeight |
326 | TableViewRowHeightIntAnimation |
327 | int |
328 | ✕ |
329 |
330 |
331 | TimePicker |
332 | FontSize |
333 | TimePickerFontSizeDoubleAnimation |
334 | double |
335 | ✓ |
336 |
337 |
338 | TextColor |
339 | TimePickerTextColorAnimation |
340 | Color |
341 | ✓ |
342 |
343 |
344 | Editor |
345 | FontSize |
346 | EditorFontSizeDoubleAnimation |
347 | double |
348 | ✓ |
349 |
350 |
351 | PlaceholderColor |
352 | EditorPlaceholderColorAnimation |
353 | Color |
354 | ✓ |
355 |
356 |
357 | TextColor |
358 | EditorTextColorAnimation |
359 | Color |
360 | ✓ |
361 |
362 |
363 | Entry |
364 | FontSize |
365 | EntryFontSizeDoubleAnimation |
366 | double |
367 | ✓ |
368 |
369 |
370 | PlaceholderColor |
371 | EntryPlaceholderColorAnimation |
372 | Color |
373 | ✓ |
374 |
375 |
376 | TextColor |
377 | EntryTextColorAnimation |
378 | Color |
379 | ✓ |
380 |
381 |
382 | ListView |
383 | RowHeight |
384 | ListViewRowHeightDoubleAnimation |
385 | double |
386 | ✕ |
387 |
388 |
389 | SeparatorColor |
390 | ListViewSeparatorColorAnimation |
391 | Color |
392 | ✓ |
393 |
394 |
395 | Frame |
396 | BorderColor |
397 | FrameBorderColorAnimation |
398 | Color |
399 | ✓ |
400 |
401 |
402 | CornerRadius |
403 | FrameCornerRadiusAnimation |
404 | CornerRadius |
405 | ✓ |
406 |
407 |
408 | OutlineColor(Obsolete) |
409 | FrameOutlineColorAnimation |
410 | Color |
411 | ✓ |
412 |
413 |
414 |
415 | # Xamarin.Forms namespace Class Diagram
416 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 |
10 | namespace XFAnimationDemo.Droid
11 | {
12 | [Activity(Label = "XFAnimationDemo", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
14 | {
15 | protected override void OnCreate(Bundle savedInstanceState)
16 | {
17 | TabLayoutResource = Resource.Layout.Tabbar;
18 | ToolbarResource = Resource.Layout.Toolbar;
19 |
20 | base.OnCreate(savedInstanceState);
21 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
22 | LoadApplication(new App());
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("XFAnimationDemo.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("XFAnimationDemo.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-hdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-hdpi/Icon.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xhdpi/Icon.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xxhdpi/Icon.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xxxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xxxhdpi/Icon.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
24 |
27 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.Android/XFAnimationDemo.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df}
9 | Library
10 | XFAnimationDemo.Droid
11 | XFAnimationDemo.Android
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Properties\AndroidManifest.xml
16 | Resources
17 | Assets
18 | false
19 | v8.1
20 | Xamarin.Android.Net.AndroidClientHandler
21 |
22 |
23 |
24 |
25 | true
26 | portable
27 | false
28 | bin\Debug
29 | DEBUG;
30 | prompt
31 | 4
32 | None
33 |
34 |
35 | true
36 | pdbonly
37 | true
38 | bin\Release
39 | prompt
40 | 4
41 | true
42 | false
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}
97 | XFAnimationDemo
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace XFAnimationDemo.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone",
7 | "filename": "Icon40.png"
8 | },
9 | {
10 | "scale": "3x",
11 | "size": "20x20",
12 | "idiom": "iphone",
13 | "filename": "Icon60.png"
14 | },
15 | {
16 | "scale": "2x",
17 | "size": "29x29",
18 | "idiom": "iphone",
19 | "filename": "Icon58.png"
20 | },
21 | {
22 | "scale": "3x",
23 | "size": "29x29",
24 | "idiom": "iphone",
25 | "filename": "Icon87.png"
26 | },
27 | {
28 | "scale": "2x",
29 | "size": "40x40",
30 | "idiom": "iphone",
31 | "filename": "Icon80.png"
32 | },
33 | {
34 | "scale": "3x",
35 | "size": "40x40",
36 | "idiom": "iphone",
37 | "filename": "Icon120.png"
38 | },
39 | {
40 | "scale": "2x",
41 | "size": "60x60",
42 | "idiom": "iphone",
43 | "filename": "Icon120.png"
44 | },
45 | {
46 | "scale": "3x",
47 | "size": "60x60",
48 | "idiom": "iphone",
49 | "filename": "Icon180.png"
50 | },
51 | {
52 | "scale": "1x",
53 | "size": "20x20",
54 | "idiom": "ipad",
55 | "filename": "Icon20.png"
56 | },
57 | {
58 | "scale": "2x",
59 | "size": "20x20",
60 | "idiom": "ipad",
61 | "filename": "Icon40.png"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "29x29",
66 | "idiom": "ipad",
67 | "filename": "Icon29.png"
68 | },
69 | {
70 | "scale": "2x",
71 | "size": "29x29",
72 | "idiom": "ipad",
73 | "filename": "Icon58.png"
74 | },
75 | {
76 | "scale": "1x",
77 | "size": "40x40",
78 | "idiom": "ipad",
79 | "filename": "Icon40.png"
80 | },
81 | {
82 | "scale": "2x",
83 | "size": "40x40",
84 | "idiom": "ipad",
85 | "filename": "Icon80.png"
86 | },
87 | {
88 | "scale": "1x",
89 | "size": "76x76",
90 | "idiom": "ipad",
91 | "filename": "Icon76.png"
92 | },
93 | {
94 | "scale": "2x",
95 | "size": "76x76",
96 | "idiom": "ipad",
97 | "filename": "Icon152.png"
98 | },
99 | {
100 | "scale": "2x",
101 | "size": "83.5x83.5",
102 | "idiom": "ipad",
103 | "filename": "Icon167.png"
104 | },
105 | {
106 | "scale": "1x",
107 | "size": "1024x1024",
108 | "idiom": "ios-marketing",
109 | "filename": "Icon1024.png"
110 | }
111 | ],
112 | "properties": {},
113 | "info": {
114 | "version": 1,
115 | "author": "xcode"
116 | }
117 | }
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/Star.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "idiom": "universal"
5 | },
6 | {
7 | "filename": "star.png",
8 | "scale": "1x",
9 | "idiom": "universal"
10 | },
11 | {
12 | "filename": "star@2x.png",
13 | "scale": "2x",
14 | "idiom": "universal"
15 | },
16 | {
17 | "filename": "star@3x.png",
18 | "scale": "3x",
19 | "idiom": "universal"
20 | },
21 | {
22 | "idiom": "iphone"
23 | },
24 | {
25 | "scale": "1x",
26 | "idiom": "iphone"
27 | },
28 | {
29 | "scale": "2x",
30 | "idiom": "iphone"
31 | },
32 | {
33 | "subtype": "retina4",
34 | "scale": "2x",
35 | "idiom": "iphone"
36 | },
37 | {
38 | "scale": "3x",
39 | "idiom": "iphone"
40 | },
41 | {
42 | "idiom": "ipad"
43 | },
44 | {
45 | "scale": "1x",
46 | "idiom": "ipad"
47 | },
48 | {
49 | "scale": "2x",
50 | "idiom": "ipad"
51 | },
52 | {
53 | "idiom": "watch"
54 | },
55 | {
56 | "scale": "2x",
57 | "idiom": "watch"
58 | },
59 | {
60 | "screenWidth": "{130,145}",
61 | "scale": "2x",
62 | "idiom": "watch"
63 | },
64 | {
65 | "screenWidth": "{146,165}",
66 | "scale": "2x",
67 | "idiom": "watch"
68 | },
69 | {
70 | "idiom": "mac"
71 | },
72 | {
73 | "scale": "1x",
74 | "idiom": "mac"
75 | },
76 | {
77 | "scale": "2x",
78 | "idiom": "mac"
79 | },
80 | {
81 | "idiom": "car"
82 | },
83 | {
84 | "scale": "2x",
85 | "idiom": "car"
86 | },
87 | {
88 | "scale": "3x",
89 | "idiom": "car"
90 | }
91 | ],
92 | "info": {
93 | "version": 1,
94 | "author": "xcode"
95 | }
96 | }
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/Star.imageset/star@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/Star.imageset/star@2x.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Assets.xcassets/Star.imageset/star@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Assets.xcassets/Star.imageset/star@3x.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 8.0
25 | CFBundleDisplayName
26 | XFAnimationDemo
27 | CFBundleIdentifier
28 | com.takecx.XFAnimationDemo
29 | CFBundleVersion
30 | 1.0
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | CFBundleName
34 | XFAnimationDemo
35 | XSAppIconAssets
36 | Assets.xcassets/AppIcon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace XFAnimationDemo.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("XFAnimationDemo.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("XFAnimationDemo.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takecx/Xamarin.Forms.AnimationsPack/1e57e15eed6084d7558b9f62e7df9f0525f7e6e9/demo/XFAnimationDemo.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.iOS/XFAnimationDemo.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | {6143fdea-f3c2-4a09-aafa-6e230626515e}
11 | Exe
12 | XFAnimationDemo.iOS
13 | Resources
14 | XFAnimationDemo.iOS
15 | NSUrlSessionHandler
16 |
17 |
18 |
19 |
20 | true
21 | full
22 | false
23 | bin\iPhoneSimulator\Debug
24 | DEBUG
25 | prompt
26 | 4
27 | false
28 | x86_64
29 | None
30 | true
31 |
32 |
33 | none
34 | true
35 | bin\iPhoneSimulator\Release
36 | prompt
37 | 4
38 | None
39 | x86_64
40 | false
41 |
42 |
43 | true
44 | full
45 | false
46 | bin\iPhone\Debug
47 | DEBUG
48 | prompt
49 | 4
50 | false
51 | ARM64
52 | iPhone Developer
53 | true
54 | Entitlements.plist
55 |
56 |
57 | none
58 | true
59 | bin\iPhone\Release
60 | prompt
61 | 4
62 | ARM64
63 | false
64 | iPhone Developer
65 | Entitlements.plist
66 |
67 |
68 | none
69 | True
70 | bin\iPhone\Ad-Hoc
71 | prompt
72 | 4
73 | False
74 | ARM64
75 | True
76 | Automatic:AdHoc
77 | iPhone Distribution
78 | Entitlements.plist
79 |
80 |
81 | none
82 | True
83 | bin\iPhone\AppStore
84 | prompt
85 | 4
86 | False
87 | ARM64
88 | Automatic:AppStore
89 | iPhone Distribution
90 | Entitlements.plist
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | false
103 |
104 |
105 | false
106 |
107 |
108 | false
109 |
110 |
111 | false
112 |
113 |
114 | false
115 |
116 |
117 | false
118 |
119 |
120 | false
121 |
122 |
123 | false
124 |
125 |
126 | false
127 |
128 |
129 | false
130 |
131 |
132 | false
133 |
134 |
135 | false
136 |
137 |
138 | false
139 |
140 |
141 | false
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}
160 | XFAnimationDemo
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XFAnimationDemo.Android", "XFAnimationDemo.Android\XFAnimationDemo.Android.csproj", "{2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XFAnimationDemo.iOS", "XFAnimationDemo.iOS\XFAnimationDemo.iOS.csproj", "{C054CFF1-70E1-4ECF-BFFB-2874B516B124}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XFAnimationDemo", "XFAnimationDemo\XFAnimationDemo.csproj", "{BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
15 | Release|iPhoneSimulator = Release|iPhoneSimulator
16 | Debug|iPhone = Debug|iPhone
17 | Release|iPhone = Release|iPhone
18 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
19 | AppStore|iPhone = AppStore|iPhone
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
27 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
28 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
29 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
30 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
31 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Debug|iPhone.Build.0 = Debug|Any CPU
32 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|iPhone.ActiveCfg = Release|Any CPU
33 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Release|iPhone.Build.0 = Release|Any CPU
34 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
35 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
36 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
37 | {2FCD8279-F2B1-48B5-8673-1B1DE8E4E2AA}.AppStore|iPhone.Build.0 = Debug|Any CPU
38 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
39 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
40 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
41 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
42 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
43 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
44 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
45 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
46 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|iPhone.ActiveCfg = Debug|iPhone
47 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Debug|iPhone.Build.0 = Debug|iPhone
48 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|iPhone.ActiveCfg = Release|iPhone
49 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Release|iPhone.Build.0 = Release|iPhone
50 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
51 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
52 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
53 | {C054CFF1-70E1-4ECF-BFFB-2874B516B124}.AppStore|iPhone.Build.0 = AppStore|iPhone
54 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
59 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
60 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
61 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
62 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
63 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Debug|iPhone.Build.0 = Debug|Any CPU
64 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|iPhone.ActiveCfg = Release|Any CPU
65 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Release|iPhone.Build.0 = Release|Any CPU
66 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
67 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
68 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
69 | {BD32CABD-5EC6-4D10-9CA1-0B3BDD8333E9}.AppStore|iPhone.Build.0 = Debug|Any CPU
70 | EndGlobalSection
71 | EndGlobal
72 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | #F5ECCE
6 | #BDBDBD
7 |
8 |
9 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
6 | namespace XFAnimationDemo
7 | {
8 | public partial class App : Application
9 | {
10 | public App()
11 | {
12 | InitializeComponent();
13 |
14 | MainPage = new MainPage();
15 | }
16 |
17 | protected override void OnStart()
18 | {
19 | // Handle when your app starts
20 | }
21 |
22 | protected override void OnSleep()
23 | {
24 | // Handle when your app sleeps
25 | }
26 |
27 | protected override void OnResume()
28 | {
29 | // Handle when your app resumes
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ActivityIndicatorDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ActivityIndicatorDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class ActivityIndicatorDemo : ContentPage
9 | {
10 | public ActivityIndicatorDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/BoxViewDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/BoxViewDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class BoxViewDemo : ContentPage
9 | {
10 | public BoxViewDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ButtonDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ButtonDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class ButtonDemo : ContentPage
9 | {
10 | public ButtonDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/DatePickerDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/DatePickerDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class DatePickerDemo : ContentPage
9 | {
10 | public DatePickerDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/EditorDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/EditorDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class EditorDemo : ContentPage
9 | {
10 | public EditorDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/EntryDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/EntryDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class EntryDemo : ContentPage
9 | {
10 | public EntryDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/FrameDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/FrameDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class FrameDemo : ContentPage
9 | {
10 | public FrameDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/GridDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/GridDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class GridDemo : ContentPage
9 | {
10 | public GridDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/LabelDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/LabelDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class LabelDemo : ContentPage
9 | {
10 | public LabelDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/LayoutDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/LayoutDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class LayoutDemo : ContentPage
9 | {
10 | public LayoutDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ListViewDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ListViewDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class ListViewDemo : ContentPage
9 | {
10 | public ListViewDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/PickerDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/PickerDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class PickerDemo : ContentPage
9 | {
10 | public PickerDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ProgressBarDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ProgressBarDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class ProgressBarDemo : ContentPage
9 | {
10 | public ProgressBarDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/SliderDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/SliderDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class SliderDemo : ContentPage
9 | {
10 | public SliderDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/StackLayoutDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/StackLayoutDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class StackLayoutDemo : ContentPage
9 | {
10 | public StackLayoutDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/SwitchDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/SwitchDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class SwitchDemo : ContentPage
9 | {
10 | public SwitchDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/TimePickerDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/TimePickerDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class TimePickerDemo : ContentPage
9 | {
10 | public TimePickerDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ViewDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/ViewDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class ViewDemo : ContentPage
9 | {
10 | public ViewDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/VisualElementDemo.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/Controls/VisualElementDemo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class VisualElementDemo : ContentPage
9 | {
10 | public VisualElementDemo()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xamarin.Forms;
7 |
8 | namespace XFAnimationDemo
9 | {
10 | public partial class MainPage : MasterDetailPage
11 | {
12 | public MainPage()
13 | {
14 | InitializeComponent();
15 |
16 | masterPage.listView.ItemSelected += OnItemSelected;
17 | }
18 |
19 | void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
20 | {
21 | var item = e.SelectedItem as MasterPageItem;
22 | if (item != null)
23 | {
24 | Detail = new NavigationPage((Page)Activator.CreateInstance(item.TargetType));
25 | masterPage.listView.SelectedItem = null;
26 | IsPresented = false;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MainPageViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.ObjectModel;
3 | using System.ComponentModel;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 | using System.Windows.Input;
7 | using Prism.Commands;
8 | using Prism.Mvvm;
9 | using Xamarin.Forms;
10 |
11 | namespace XFAnimationDemo
12 | {
13 | public class MainPageViewModel : BindableBase
14 | {
15 | #region Property
16 | private bool _IsAnimationWorking;
17 | public bool IsAnimationWorking
18 | {
19 | get { return _IsAnimationWorking; }
20 | set { this.SetProperty(ref this._IsAnimationWorking, value); }
21 | }
22 | private ObservableCollection _PickerItems = new ObservableCollection();
23 | public ObservableCollection m_PickerItems
24 | {
25 | get { return _PickerItems; }
26 | set { this.SetProperty(ref this._PickerItems, value); }
27 | }
28 | #endregion
29 |
30 | #region Commands
31 | public DelegateCommand RunAnimation { get; private set; }
32 | #endregion
33 |
34 | public MainPageViewModel()
35 | {
36 | // Create commands
37 | RunAnimation = new DelegateCommand(RunAnimationCommand);
38 |
39 | // Initialize
40 | IsAnimationWorking = false;
41 | m_PickerItems = new ObservableCollection { "Picker", "VisualElement", "View", "Label", "Entry" };
42 | }
43 |
44 | private void RunAnimationCommand()
45 | {
46 | Task.Run(() =>
47 | {
48 | IsAnimationWorking = true;
49 | Thread.Sleep(2000);
50 | }).ContinueWith((r) =>
51 | {
52 | IsAnimationWorking = false;
53 | });
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MasterPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MasterPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public partial class MasterPage : ContentPage
9 | {
10 | public MasterPage()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MasterPageItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace XFAnimationDemo
3 | {
4 | public class MasterPageItem
5 | {
6 | public string Title { get; set; }
7 |
8 | public string IconSource { get; set; }
9 |
10 | public Type TargetType { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/MasterPageViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.ObjectModel;
3 | using Prism.Mvvm;
4 | using Xamarin.Forms;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | public class MasterPageViewModel : BindableBase
9 | {
10 | #region Notifiable Property
11 | private ObservableCollection _DetailPages = new ObservableCollection();
12 | public ObservableCollection m_DetailPages
13 | {
14 | get { return _DetailPages; }
15 | set { this.SetProperty(ref this._DetailPages, value); }
16 | }
17 | #endregion
18 |
19 | public MasterPageViewModel()
20 | {
21 | m_DetailPages.Add(new MasterPageItem { Title = "VisualElement", IconSource = "star.png", TargetType = typeof(VisualElementDemo) });
22 | m_DetailPages.Add(new MasterPageItem { Title = "View", IconSource = "star.png", TargetType = typeof(ViewDemo) });
23 | m_DetailPages.Add(new MasterPageItem { Title = "Label", IconSource = "star.png", TargetType = typeof(LabelDemo) });
24 | m_DetailPages.Add(new MasterPageItem { Title = "Entry", IconSource = "star.png", TargetType = typeof(EntryDemo) });
25 | m_DetailPages.Add(new MasterPageItem { Title = "(△)ActivityIndicator", IconSource = "star.png", TargetType = typeof(ActivityIndicatorDemo) });
26 | m_DetailPages.Add(new MasterPageItem { Title = "BoxView", IconSource = "star.png", TargetType = typeof(BoxViewDemo) });
27 | m_DetailPages.Add(new MasterPageItem { Title = "Button", IconSource = "star.png", TargetType = typeof(ButtonDemo) });
28 | m_DetailPages.Add(new MasterPageItem { Title = "DatePicker", IconSource = "star.png", TargetType = typeof(DatePickerDemo) });
29 | m_DetailPages.Add(new MasterPageItem { Title = "Layout", IconSource = "star.png", TargetType = typeof(LayoutDemo) });
30 | m_DetailPages.Add(new MasterPageItem { Title = "(X)Grid", IconSource = "star.png", TargetType = typeof(GridDemo) });
31 | m_DetailPages.Add(new MasterPageItem { Title = "StackLayout", IconSource = "star.png", TargetType = typeof(StackLayoutDemo) });
32 | m_DetailPages.Add(new MasterPageItem { Title = "Picker", IconSource = "star.png", TargetType = typeof(PickerDemo) });
33 | m_DetailPages.Add(new MasterPageItem { Title = "ProgressBar", IconSource = "star.png", TargetType = typeof(ProgressBarDemo) });
34 | m_DetailPages.Add(new MasterPageItem { Title = "Slider", IconSource = "star.png", TargetType = typeof(SliderDemo) });
35 | m_DetailPages.Add(new MasterPageItem { Title = "Switch", IconSource = "star.png", TargetType = typeof(SwitchDemo) });
36 | m_DetailPages.Add(new MasterPageItem { Title = "TimePicker", IconSource = "star.png", TargetType = typeof(TimePickerDemo) });
37 | m_DetailPages.Add(new MasterPageItem { Title = "Editor", IconSource = "star.png", TargetType = typeof(EditorDemo) });
38 | m_DetailPages.Add(new MasterPageItem { Title = "(△)ListView", IconSource = "star.png", TargetType = typeof(ListViewDemo) });
39 | m_DetailPages.Add(new MasterPageItem { Title = "Frame", IconSource = "star.png", TargetType = typeof(FrameDemo) });
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/RunAnimationCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 | using System.Windows.Input;
5 |
6 | namespace XFAnimationDemo
7 | {
8 | internal class RunAnimationCommanda : ICommand
9 | {
10 | private MainPageViewModel mainPageViewModel;
11 |
12 | public RunAnimationCommanda(MainPageViewModel mainPageViewModel)
13 | {
14 | this.mainPageViewModel = mainPageViewModel;
15 | }
16 |
17 | public event EventHandler CanExecuteChanged;
18 |
19 | public bool CanExecute(object parameter)
20 | {
21 | return true;
22 | }
23 |
24 | public void Execute(object parameter)
25 | {
26 | Task.Run(() =>
27 | {
28 | mainPageViewModel.IsAnimationWorking = true;
29 | Thread.Sleep(2000);
30 | }).ContinueWith((r) =>
31 | {
32 | mainPageViewModel.IsAnimationWorking = false;
33 | });
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/demo/XFAnimationDemo/XFAnimationDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 | pdbonly
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Controls/AbsoluteLayout/AbsoluteLayoutBoundsRectangleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class AbsoluteLayoutBoundsRectangleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke AbsoluteLayout LayoutBounds Animation.
12 | /// AbsoluteLayout.LayoutBounds is Attached Property.
13 | ///
14 | /// Sender.
15 | protected override void Invoke(VisualElement sender)
16 | {
17 | //SetDefaultValueIfNeeded((sender as AbsoluteLayout).LayoutBounds);
18 |
19 | //sender.Animate(nameof(AbsoluteLayoutBoundsRectangleAnimation), new Animation((d) =>
20 | //{
21 | // (sender as AbsoluteLayout).LayoutBounds = AnimationUtil.CalcCurrentValue(From, To, d);
22 | //}),
23 | //length: Length,
24 | //easing: EasingValueConverter.Convert(Easing));
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Controls/ActivityIndicator/ActivityIndicatorColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ActivityIndicatorColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke change ActivityIndicatorColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as ActivityIndicator).Color);
17 |
18 | sender.Animate(nameof(ActivityIndicatorColorAnimation), new Animation((d) =>
19 | {
20 | (sender as ActivityIndicator).Color = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/AnimationBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xamarin.Forms.AnimationsPack.Base
5 | {
6 | public class AnimationBase : TriggerAction
7 | {
8 | // Animation Parameter
9 | public T From { get; set; } = default(T);
10 | public T To { get; set; } = default(T);
11 | public uint Length { get; set; } = 1000;
12 | public string Easing { get; set; } = "Linear";
13 |
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | throw new NotImplementedException("Please Implement Invoke() in derived-class");
17 | }
18 |
19 | protected void SetDefaultValueIfNeeded(T property)
20 | {
21 | From = From.Equals(default(T)) ? property : From;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Controls/BoxView/BoxViewColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class BoxViewColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke BoxView Color animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as BoxView).Color);
17 |
18 | sender.Animate(nameof(BoxViewColorAnimation), new Animation((d) =>
19 | {
20 | (sender as BoxView).Color = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/BoxView/BoxViewCornerRadiusAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class BoxViewCornerRadiusAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke BoxView CornerRadius animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as BoxView).CornerRadius);
17 |
18 | sender.Animate(nameof(BoxViewCornerRadiusAnimation), new Animation((d) =>
19 | {
20 | (sender as BoxView).CornerRadius = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonBorderColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonBorderColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button BorderColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).BorderColor);
17 |
18 | sender.Animate(nameof(ButtonBorderColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Button).BorderColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonBorderWidthDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonBorderWidthDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button BorderWidth animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).BorderWidth);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Button).BorderWidth = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(ButtonBorderWidthDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonCornerRadiusAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonCornerRadiusAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button CornerRadius animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).CornerRadius);
17 |
18 | sender.Animate(nameof(ButtonCornerRadiusAnimation), new Animation((d) =>
19 | {
20 | (sender as Button).CornerRadius = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Button).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(ButtonFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonPaddingThicknessAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonPaddingThicknessAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button Padding Animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).Padding);
17 |
18 | sender.Animate(nameof(ButtonPaddingThicknessAnimation), new Animation((d) =>
19 | {
20 | (sender as Button).Padding = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Button/ButtonTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ButtonTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Button TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Button).TextColor);
17 |
18 | sender.Animate(nameof(ButtonTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Button).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/DatePicker/DatePickerFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class DatePickerFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke DatePicker FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as DatePicker).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as DatePicker).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(DatePickerFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/DatePicker/DatePickerTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class DatePickerTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke DatePicker TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as DatePicker).TextColor);
17 |
18 | sender.Animate(nameof(DatePickerTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as DatePicker).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Editor/EditorFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EditorFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Editor FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Editor).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Editor).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(EditorFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Editor/EditorPlaceholderColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EditorPlaceholderColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Editor PlaceholderColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Editor).PlaceholderColor);
17 |
18 | sender.Animate(nameof(EditorPlaceholderColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Editor).PlaceholderColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Editor/EditorTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EditorTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Editor TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Editor).TextColor);
17 |
18 | sender.Animate(nameof(EditorTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Editor).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Entry/EntryFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EntryFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Entry FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Entry).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Entry).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(EntryFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Entry/EntryPlaceholderColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EntryPlaceholderColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Entry PlaceholderColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Entry).PlaceholderColor);
17 |
18 | sender.Animate(nameof(EntryPlaceholderColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Entry).PlaceholderColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Entry/EntryTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class EntryTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Entry TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Entry).TextColor);
17 |
18 | sender.Animate(nameof(EntryTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Entry).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Frame/FrameBorderColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class FrameBorderColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Frame BorderColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Frame).BorderColor);
17 |
18 | sender.Animate(nameof(FrameBorderColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Frame).BorderColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Frame/FrameCornerRadiusAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class FrameCornerRadiusAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Frame CornerRadius animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Frame).CornerRadius);
17 |
18 | sender.Animate(nameof(FrameCornerRadiusAnimation), new Animation((d) =>
19 | {
20 | (sender as Frame).CornerRadius = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Frame/FrameOutlineColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class FrameOutlineColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Frame OutlineColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Frame).OutlineColor);
17 |
18 | sender.Animate(nameof(FrameOutlineColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Frame).OutlineColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Grid/GridColumnSpacingDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class GridColumnSpacingDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Grid ColumnSpacing animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Grid).ColumnSpacing);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Grid).ColumnSpacing = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(GridColumnSpacingDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Grid/GridRowSpacingDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class GridRowSpacingDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Grid RowSpacing animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Grid).RowSpacing);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Grid).RowSpacing = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(GridRowSpacingDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Label/LabelFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class LabelFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Label FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Label).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Label).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(LabelFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Label/LabelLineHeightDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class LabelLineHeightDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Label LineHeight animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Label).LineHeight);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Label).LineHeight = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(LabelLineHeightDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Label/LabelTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.AnimationsPack.Base;
5 | using Xamarin.Forms.AnimationsPack.Utils;
6 |
7 | namespace Xamarin.Forms.AnimationsPack
8 | {
9 | public class LabelTextColorAnimation : AnimationBase
10 | {
11 | ///
12 | /// Invoke Label TextColor animation.
13 | ///
14 | /// Sender.
15 | protected override void Invoke(VisualElement sender)
16 | {
17 | SetDefaultValueIfNeeded((sender as Label).TextColor);
18 |
19 | sender.Animate(nameof(LabelTextColorAnimation), new Animation((d) =>
20 | {
21 | (sender as Label).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
22 | }),
23 | length: Length,
24 | easing: EasingValueConverter.Convert(Easing));
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Controls/Label/ListViewSeparatorColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ListViewSeparatorColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke ListView SeparatorColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as ListView).SeparatorColor);
17 |
18 | sender.Animate(nameof(ListViewSeparatorColorAnimation), new Animation((d) =>
19 | {
20 | (sender as ListView).SeparatorColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Layout/LayoutPaddingThicknessAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class LayoutPaddingThicknessAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Layout Padding Animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Layout).Margin);
17 |
18 | sender.Animate(nameof(LayoutPaddingThicknessAnimation), new Animation((d) =>
19 | {
20 | (sender as Layout).Margin = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/ListView/ListViewRowHeightDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ListViewRowHeightDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke ListView RowHeight animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as ListView).RowHeight);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as ListView).RowHeight = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(ListViewRowHeightDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Picker/PickerFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class PickerFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Picker FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Picker).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as Picker).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(PickerFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Picker/PickerTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class PickerTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Picker TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Picker).TextColor);
17 |
18 | sender.Animate(nameof(PickerTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Picker).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/ProgressBar/ProgressBarColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class ProgressBarColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke ProgressBar ProgressColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as ProgressBar).ProgressColor);
17 |
18 | sender.Animate(nameof(ProgressBarColorAnimation), new Animation((d) =>
19 | {
20 | (sender as ProgressBar).ProgressColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Slider/SliderMaximumTrackColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class SliderMaximumTrackColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Slider MaximumTrackColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Slider).MaximumTrackColor);
17 |
18 | sender.Animate(nameof(SliderMaximumTrackColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Slider).MaximumTrackColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Slider/SliderMinimumTrackColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class SliderMinimumTrackColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Slider MinimumTrackColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Slider).MinimumTrackColor);
17 |
18 | sender.Animate(nameof(SliderMinimumTrackColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Slider).MinimumTrackColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/Slider/SliderThumbColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class SliderThumbColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Slider MinimumTrackColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Slider).ThumbColor);
17 |
18 | sender.Animate(nameof(SliderThumbColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Slider).ThumbColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/StackLayout/StackLayoutSpacingDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class StackLayoutSpacingDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke StackLayout Spacing animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as StackLayout).Spacing);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as StackLayout).Spacing = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(StackLayoutSpacingDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/Switch/SwitchOnColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class SwitchOnColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke Switch OnColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as Switch).OnColor);
17 |
18 | sender.Animate(nameof(SwitchOnColorAnimation), new Animation((d) =>
19 | {
20 | (sender as Switch).OnColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/TableView/TableViewRowHeightIntAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class TableViewRowHeightIntAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke TableView RowHeight animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as TableView).RowHeight);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as TableView).RowHeight = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(TableViewRowHeightIntAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/TimePicker/TimePickerFontSizeDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class TimePickerFontSizeDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke TimePicker FontSize animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as TimePicker).FontSize);
17 |
18 | var animation = new Animation((d) =>
19 | {
20 | (sender as TimePicker).FontSize = AnimationUtil.CalcCurrentValue(From, To, d);
21 | });
22 | sender.Animate(nameof(TimePickerFontSizeDoubleAnimation), animation, length: Length, easing: EasingValueConverter.Convert(Easing));
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Controls/TimePicker/TimePickerTextColorAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class TimePickerTextColorAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke TimePicker TextColor animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as TimePicker).TextColor);
17 |
18 | sender.Animate(nameof(TimePickerTextColorAnimation), new Animation((d) =>
19 | {
20 | (sender as TimePicker).TextColor = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/View/MarginThicknessAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class MarginThicknessAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke View Margin Animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded((sender as View).Margin);
17 |
18 | sender.Animate(nameof(MarginThicknessAnimation), new Animation((d) =>
19 | {
20 | (sender as View).Margin = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/VisualElement/BackgroundColorAnimation.cs:
--------------------------------------------------------------------------------
1 | // Official Sample
2 | // https://docs.microsoft.com/ja-jp/xamarin/xamarin-forms/app-fundamentals/triggers#enterexit
3 |
4 | using System;
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.AnimationsPack.Base;
7 | using Xamarin.Forms.AnimationsPack.Utils;
8 |
9 | namespace Xamarin.Forms.AnimationsPack
10 | {
11 | public class BackgroundColorAnimation : AnimationBase
12 | {
13 | ///
14 | /// Invoke VisualElement BackgroundColor animation.
15 | ///
16 | /// Sender.
17 | protected override void Invoke(VisualElement sender)
18 | {
19 | SetDefaultValueIfNeeded(sender.BackgroundColor);
20 |
21 | sender.Animate(nameof(BackgroundColorAnimation), new Animation((d) =>
22 | {
23 | sender.BackgroundColor = AnimationUtil.CalcCurrentValue(From, To, d);
24 | }),
25 | length: Length,
26 | easing: EasingValueConverter.Convert(Easing));
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Controls/VisualElement/HeightRequestDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class HeightRequestDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke VisualElement HeightRequest animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded(sender.Height);
17 |
18 | sender.Animate(nameof(HeightRequestDoubleAnimation), new Animation((d) =>
19 | {
20 | sender.HeightRequest = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/VisualElement/OpacityDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class OpacityDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke VisualElement Opacity animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded(sender.Opacity);
17 |
18 | sender.Animate(nameof(OpacityDoubleAnimation), new Animation((d) =>
19 | {
20 | sender.Opacity = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Controls/VisualElement/WidthRequestDoubleAnimation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.AnimationsPack.Base;
4 | using Xamarin.Forms.AnimationsPack.Utils;
5 |
6 | namespace Xamarin.Forms.AnimationsPack
7 | {
8 | public class WidthRequestDoubleAnimation : AnimationBase
9 | {
10 | ///
11 | /// Invoke VisualElement WidthRequest animation.
12 | ///
13 | /// Sender.
14 | protected override void Invoke(VisualElement sender)
15 | {
16 | SetDefaultValueIfNeeded(sender.WidthRequest);
17 |
18 | sender.Animate(nameof(WidthRequestDoubleAnimation), new Animation((d) =>
19 | {
20 | sender.WidthRequest = AnimationUtil.CalcCurrentValue(From, To, d);
21 | }),
22 | length: Length,
23 | easing: EasingValueConverter.Convert(Easing));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Utils/AnimationUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xamarin.Forms.AnimationsPack.Utils
5 | {
6 | public static class AnimationUtil
7 | {
8 | public static double CalcCurrentValue(double from, double to, double animationRatio)
9 | {
10 | var gap = to - from;
11 | return from + gap * animationRatio;
12 | }
13 |
14 | public static Color CalcCurrentValue(Color from, Color to, double animationRatio)
15 | {
16 | var rVal = (to.R - from.R) * animationRatio;
17 | var gVal = (to.G - from.G) * animationRatio;
18 | var bVal = (to.B - from.B) * animationRatio;
19 | return Color.FromRgb(from.R + rVal, from.G + gVal, from.B + bVal);
20 | }
21 |
22 | public static Thickness CalcCurrentValue(Thickness from, Thickness to, double animationRatio)
23 | {
24 | return new Thickness(from.Left + (to.Left - from.Left) * animationRatio,
25 | from.Top + (to.Top - from.Top) * animationRatio,
26 | from.Right + (to.Right - from.Right) * animationRatio,
27 | from.Bottom + (to.Bottom - from.Bottom) * animationRatio);
28 | }
29 |
30 | public static Rectangle CalcCurrentValue(Rectangle from, Rectangle to, double animationRatio)
31 | {
32 | return new Rectangle(from.Left + (to.Left - from.Left) * animationRatio,
33 | from.Top + (to.Top - from.Top) * animationRatio,
34 | from.Right + (to.Right - from.Right) * animationRatio,
35 | from.Bottom + (to.Bottom - from.Bottom) * animationRatio);
36 | }
37 |
38 | public static int CalcCurrentValue(int from, int to, double animationRatio)
39 | {
40 | return (int)(from + (to - from) * animationRatio);
41 | }
42 |
43 | public static CornerRadius CalcCurrentValue(CornerRadius from, CornerRadius to, double animationRatio)
44 | {
45 | return new CornerRadius(from.TopLeft + (to.TopLeft - from.TopLeft) * animationRatio,
46 | from.TopRight + (to.TopRight - from.TopRight) * animationRatio,
47 | from.BottomLeft + (to.BottomLeft - from.BottomLeft) * animationRatio,
48 | from.BottomRight + (to.BottomRight - from.BottomRight) * animationRatio);
49 | }
50 |
51 | public static float CalcCurrentValue(float from, float to, double animationRatio)
52 | {
53 | return (float)(from + (to - from) * animationRatio);
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/Utils/EasingValueConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace Xamarin.Forms.AnimationsPack.Utils
5 | {
6 | public static class EasingValueConverter
7 | {
8 | public static Easing Convert(string inEasingStr)
9 | {
10 | var easing = inEasingStr.ToLower();
11 | switch (easing)
12 | {
13 | case "bouncein":
14 | return Easing.BounceIn;
15 | case "bounceout":
16 | return Easing.BounceOut;
17 | case "cubicin":
18 | return Easing.CubicIn;
19 | case "cubicout":
20 | return Easing.CubicOut;
21 | case "cubicinout":
22 | return Easing.CubicInOut;
23 | case "linear":
24 | return Easing.Linear;
25 | case "sinin":
26 | return Easing.SinIn;
27 | case "sinout":
28 | return Easing.SinOut;
29 | case "sininout":
30 | return Easing.SinInOut;
31 | case "springin":
32 | return Easing.SpringIn;
33 | case "springout":
34 | return Easing.SpringOut;
35 | default:
36 | Console.WriteLine("There is no Easing named " + easing);
37 | return Easing.Linear;
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms.AnimationsPack.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | Xamarin.Forms.AnimationsPack
6 | 1.0.1
7 | Takeshi Noguchi
8 | Takeshi Noguchi
9 | https://github.com/takecx/Xamarin.Forms.AnimationsPack/blob/master/LICENSE
10 | https://github.com/takecx/Xamarin.Forms.AnimationsPack
11 | https://github.com/takecx/Xamarin.Forms.AnimationsPack
12 | GitHub
13 | Visual Element Animation library for Xamarin.Forms. BackgroundColor,Opacity,Margin,FontSize,CornerRadius and so on.
14 | Copyright (C) 2018
15 | xamarin;forms;animation;xamarinforms
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms.AnimationsPack.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.AnimationsPack", "Xamarin.Forms.AnimationsPack.csproj", "{53827C76-4706-4360-8C80-6F3EFF0C7B3A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {53827C76-4706-4360-8C80-6F3EFF0C7B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {53827C76-4706-4360-8C80-6F3EFF0C7B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {53827C76-4706-4360-8C80-6F3EFF0C7B3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {53827C76-4706-4360-8C80-6F3EFF0C7B3A}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | EndGlobal
18 |
--------------------------------------------------------------------------------