{"id":15647431,"url":"https://github.com/awaescher/fluenttransitions","last_synced_at":"2025-09-09T06:53:48.375Z","repository":{"id":85674755,"uuid":"302171479","full_name":"awaescher/FluentTransitions","owner":"awaescher","description":"▶ Smooth UI animations \u0026 transitions for .NET (even WinForms)","archived":false,"fork":false,"pushed_at":"2024-05-10T23:06:36.000Z","size":8372,"stargazers_count":60,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T03:22:51.343Z","etag":null,"topics":["animate","animated","animation","coreanimation","gui","reflection","transitions","tweening","ui","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awaescher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-07T22:06:56.000Z","updated_at":"2025-03-25T03:52:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"06e8cc02-f93c-422b-8857-6eec3d98f1b6","html_url":"https://github.com/awaescher/FluentTransitions","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaescher%2FFluentTransitions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaescher%2FFluentTransitions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaescher%2FFluentTransitions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaescher%2FFluentTransitions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awaescher","download_url":"https://codeload.github.com/awaescher/FluentTransitions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248713178,"owners_count":21149645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animate","animated","animation","coreanimation","gui","reflection","transitions","tweening","ui","winforms"],"created_at":"2024-10-03T12:19:25.410Z","updated_at":"2025-04-13T12:25:59.440Z","avatar_url":"https://github.com/awaescher.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FluentTransitions\n\n[![NuGet Status](https://img.shields.io/nuget/v/FluentTransitions.svg)](https://www.nuget.org/packages/FluentTransitions/)\n\nFluentTransitions 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.\n\n![FluentDragDrop effects with FluentTransitions](./doc/Effects.gif)\n\n\u003csup\u003eFluentTransitions powering [FluentDragDrop](https://github.com/awaescher/FluentDragDrop), a library to create stunning drag and drop effects with Windows Forms.\u003c/sup\u003e\n\n## What can it do for me?\n\nFluentTransitions 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:\n\n```csharp\nvar maxTop = button1.Parent.Height - button1.Height;\n\nTransition\n    .With(button1, nameof(Top), maxTop)      // target, property, value\n    .Bounce(TimeSpan.FromMilliseconds(500)); // method and duration\n```\n\n![Button drop effect](./doc/button.gif)\n\n### Multi targeting\n\nTransitions can manipulate multiple properties from one or multiple objects simultaneously just by chaining the `.With()` methods:\n\n```csharp\nTransition\n    .With(button1, nameof(Left), 300)\n    .With(button2, nameof(Top), 200)\n    .With(Form1, nameof(Opacity), 0.0)\n    .EaseInEaseOut(TimeSpan.FromSeconds(2));\n```\n\nThis code animates the movement of two buttons while it fades out the whole form. All of this is running in parallel within two seconds.\n\n### Chaining\n\nSome 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(...)`:\n\n```csharp\nTransition.RunChain\n(\n    Transition\n        .With(button1, nameof(Left), 300)\n        .With(button2, nameof(Top), 200)\n        .Build(new Linear(TimeSpan.FromSeconds(1))),\n    Transition\n        .With(Form1, nameof(Opacity), 0.0)\n        .Build(new Linear(TimeSpan.FromSeconds(1)))\n);\n```\n\nThis 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.\n\n### Completion\n\nEach transition raises an event once it is completed. This can be useful to run code after the UI is done with animating.\n\n```csharp\nvar t1 = Transition\n    .With(button1, nameof(Left), 300)\n    .With(button2, nameof(Top), 200)\n    .HookOnCompletionInUiThread(SynchronizationContext.Current, () =\u003e this.Close())\n    .Build(new EaseInEaseOut(TimeSpan.FromSeconds(1)));\n    \nTransition.Run(t1);\n```\n\n\u003e Prefer `Transition.RunChain()` to run animations sequentially.\n\n# More Samples\n\nBack 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.\n\n![Login form sample 1](./doc/itv1.gif)\n\n![Login form sample 2](./doc/itv2.gif)\n\nBut FluentTransitions is more that just smoothly moving and sizing controls, you can do pretty much everything if you're creative enough.\n\n![Ripple effect sample](./doc/ripple.gif)\n\n![Text transition sample](./doc/text.gif)\n\n## Acknowledgements\n\nIdea and initial implementation by [Richard S. Shepherd on Google Code](https://code.google.com/p/dot-net-transitions/).\n\nDec 2020 [Andreas Wäscher](https://github.com/awaescher)\n- Added support for [Easing Functions](https://easings.net/)\n- Added built-in easing implementations by [Mauro Sampietro](https://www.codeproject.com/Articles/827808/Control-Animation-in-Winforms)\n\nOct 2020 [Andreas Wäscher](https://github.com/awaescher)\n- Migrated to .NET Core 3.1 and .NET Framework 4.8\n- Updated namespaces, class names and the code itself to meet modern code standards\n- Added fluent syntax to build and run transitions\n- Switched from \"dot-net-transitions\" to \"FluentTransitions\"\n\nApr 2020 [zhenyuan0502](https://github.com/zhenyuan0502)\n- Migrated to .NET Core 3.0\n\nJul 2015 [Uwe Keim](https://github.com/UweKeim)\n- Copied this repository from [Google Code](https://code.google.com/p/dot-net-transitions/) to save it from disappearing when Google Code shuts down\n\n\u0026copy; 2009 Richard S. Shepherd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaescher%2Ffluenttransitions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawaescher%2Ffluenttransitions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaescher%2Ffluenttransitions/lists"}