All Projects → awaescher → FluentTransitions

awaescher / FluentTransitions

Licence: MIT license
▶ Smooth UI animations & transitions for .NET

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to FluentTransitions

Sequent
A simple continuous animation library for Android UI.
Stars: ✭ 263 (+874.07%)
Mutual labels:  animated, animate
SwiftTweener
A pure Swift animation engine.
Stars: ✭ 74 (+174.07%)
Mutual labels:  tweening, transitions
Animatedgraph
Animated Graph which you can include in your application to show information in more attractive way
Stars: ✭ 162 (+500%)
Mutual labels:  animated, coreanimation
Sequents
A simple continuous animation library for iOS UI.
Stars: ✭ 31 (+14.81%)
Mutual labels:  animated, animate
React Motion Layout
🦸 Beautiful immersive React hero animations.
Stars: ✭ 509 (+1785.19%)
Mutual labels:  transitions, animate
CircleFlow
CircleFlow is a project that revises Coverflow effect. Using Core Animation to build Coverflow-like effect but with a half-circle path
Stars: ✭ 39 (+44.44%)
Mutual labels:  coreanimation
react-native-segment-control
Swipeable SegmentedControl component for React Native apps
Stars: ✭ 21 (-22.22%)
Mutual labels:  animated
react-native-scrollable-animated-header
🤯 React Native Animated Header with ScrollView
Stars: ✭ 112 (+314.81%)
Mutual labels:  animated
bevy easings
Helpers and Plugins for Bevy
Stars: ✭ 83 (+207.41%)
Mutual labels:  tweening
UberAnimation
Heyaa! This is an attempt to mimic the animation Uber and Facebook shows up as a Congratulatory Pop-up. Looking at the attached GIF will give you a better idea of what this project covers. All written in Swift4.
Stars: ✭ 58 (+114.81%)
Mutual labels:  coreanimation
react-native-3d-swiper
A performant, javascript-only 3d swiper for react-native
Stars: ✭ 36 (+33.33%)
Mutual labels:  animated
react-native-animated-flatlist
Animated Flatlist for React-Native
Stars: ✭ 56 (+107.41%)
Mutual labels:  animated
gephi twitter media downloader
A small script designed to take either a .csv of Tweet ids, or the export from Gephi's TwitterStreamingImporter Plugin and download related Tweet media.
Stars: ✭ 41 (+51.85%)
Mutual labels:  animated
hoc-react-animate
Add a CSS class whenever a props change (or/and at mount)
Stars: ✭ 14 (-48.15%)
Mutual labels:  animate
react-native-card-animated-modal
An animated modal from a card item in a list for React Native.
Stars: ✭ 93 (+244.44%)
Mutual labels:  animated
react-native-rough
⚛️✍️Rough.js bindings for that hand-drawn feel.
Stars: ✭ 106 (+292.59%)
Mutual labels:  animated
UnityGUI
UGUI Panel Systems for navigation, animation and more
Stars: ✭ 80 (+196.3%)
Mutual labels:  transitions
WatermelonMessenger
React Native App using react, redux, sagas, hooks, react navigation v5
Stars: ✭ 63 (+133.33%)
Mutual labels:  animated
pixi-ease
pixi.js animation library using easing functions
Stars: ✭ 90 (+233.33%)
Mutual labels:  animate
flip view
A Flutter app with flip animation to view profiles of friends. 🌟
Stars: ✭ 69 (+155.56%)
Mutual labels:  animated

FluentTransitions

NuGet Status

FluentTransitions lets you create animated transitions of any property of user-interface elements in .NET. It provides a simple API to perform UI animations in a similar way to Apple's Core Animation library for iOS, iPadOS and macOS.

FluentDragDrop effects with FluentTransitions

FluentTransitions powering FluentDragDrop, a library to create stunning drag and drop effects with Windows Forms.

What can it do for me?

FluentTransitions allows smooth UI transitions with Windows Forms and GDI+. While the animation above shows several effects in combination, you will probably start with simpler things like the transition of a property of a Windows Forms control:

var maxTop = button1.Parent.Height - button1.Height;

Transition
    .With(button1, nameof(Top), maxTop)      // target, property, value
    .Bounce(TimeSpan.FromMilliseconds(500)); // method and duration

Button drop effect

Multi targeting

Transitions can manipulate multiple properties from one or multiple objects simultaneously just by chaining the .With() methods:

Transition
    .With(button1, nameof(Left), 300)
    .With(button2, nameof(Top), 200)
    .With(Form1, nameof(Opacity), 0.0)
    .EaseInEaseOut(TimeSpan.FromSeconds(2));

This code animates the movement of two buttons while it fades out the whole form. All of this is running in parallel within two seconds.

Chaining

Some effects might require multiple transitions to be executed sequentially. FluentTransitions provides a concept called "Chaining". To use it, simply build your transitions and run them with Transition.RunChain(...):

Transition.RunChain
(
    Transition
        .With(button1, nameof(Left), 300)
        .With(button2, nameof(Top), 200)
        .Build(new Linear(TimeSpan.FromSeconds(1))),
    Transition
        .With(Form1, nameof(Opacity), 0.0)
        .Build(new Linear(TimeSpan.FromSeconds(1)))
);

This code animates the movement of two buttons first. Once this is done, it fades out the whole form. Both transitions are completed within two seconds.

Completion

Each transition raises an event once it is completed. This can be useful to run code after the UI is done with animating.

var t1 = Transition
    .With(button1, nameof(Left), 300)
    .With(button2, nameof(Top), 200)
    .HookOnCompletionInUiThread(SynchronizationContext.Current, () => this.Close())
    .Build(new EaseInEaseOut(TimeSpan.FromSeconds(1)));
    
Transition.Run(t1);

Prefer Transition.RunChain() to run animations sequentially.

More Samples

Back in the year 2011, I used these transitions to spice up two login forms for a customer project. Be kind to me, I was young and just wanted to make something fancy. Nevertheless, I think it's pretty special to WinForms.

Login form sample 1

Login form sample 2

But FluentTransitions is more that just smoothly moving and sizing controls, you can do pretty much everything if you're creative enough.

Ripple effect sample

Text transition sample

Acknowledgements

Idea and initial implementation by Richard S. Shepherd on Google Code.

Dec 2020 Andreas Wäscher

Oct 2020 Andreas Wäscher

  • Migrated to .NET Core 3.1 and .NET Framework 4.8
  • Updated namespaces, class names and the code itself to meet modern code standards
  • Added fluent syntax to build and run transitions
  • Switched from "dot-net-transitions" to "FluentTransitions"

Apr 2020 zhenyuan0502

  • Migrated to .NET Core 3.0

Jul 2015 Uwe Keim

  • Copied this repository from Google Code to save it from disappearing when Google Code shuts down

© 2009 Richard S. Shepherd.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].