Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OliveTreeBible/Xamarin.Transitions
Declarative & implicit animations Library for Xamarin Forms
https://github.com/OliveTreeBible/Xamarin.Transitions
Last synced: 30 days ago
JSON representation
Declarative & implicit animations Library for Xamarin Forms
- Host: GitHub
- URL: https://github.com/OliveTreeBible/Xamarin.Transitions
- Owner: OliveTreeBible
- License: mit
- Created: 2016-08-05T18:02:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T18:47:28.000Z (almost 5 years ago)
- Last Synced: 2024-11-02T07:50:06.492Z (about 1 month ago)
- Language: C#
- Homepage:
- Size: 71.3 KB
- Stars: 49
- Watchers: 12
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin-forms - Xamarin Transitions ★49
README
# Xamarin Transitions [![Build](https://github.com/OliveTreeBible/Xamarin.Transitions/workflows/Build/badge.svg)](https://github.com/OliveTreeBible/Xamarin.Transitions/actions) [![NuGet Status](https://img.shields.io/nuget/v/OliveTree.Transitions?logo=nuget)](https://www.nuget.org/packages/OliveTree.Transitions/) [![Downloads](https://img.shields.io/nuget/dt/OliveTree.Transitions?logo=nuget)](https://www.nuget.org/packages/OliveTree.Transitions/)
Declarative & implicit animations Library for Xamarin Forms.
## Why Not `Xamarin.Forms.Animation`?
Xamarin Forms provides a common animation API, especially powerful with its `async`/`await` structure and extensibility. For many apps, it may be all that is necessary. **However**, it operates by setting up its own timing and modifying native view propertiies as it goes. This means the platform's hardware acceleration around animations can't be leveraged. Our experience was a sluggish feel that didn't "pop" the way a native app would.## Example
To automatically animate the opacity of an element, simply add the transition to its attached property. Any property changes will then be animated according to the declaration.```XML
xmlns:trans="clr-namespace:OliveTree.Transitions;assembly=OliveTree.Transitions"
```
Or triggered in code-behind:
```C#
StatusIndicator.Opacity = 0;
```## Setup
For the common implementation to resolve platform animations, it must be given an `ITransitionProvider`. Each platform has one built in, but you are welcome to override it should needs arise. Generally, you will initialize it with:
```C#
Forms.Init();
TransitionsLibrary.Register();
```