{"id":14986259,"url":"https://github.com/falahati/winformanimation","last_synced_at":"2025-10-03T22:58:47.024Z","repository":{"id":14515594,"uuid":"17229412","full_name":"falahati/WinFormAnimation","owner":"falahati","description":"A simple library for animating controls/values in .Net WinForm (.Net 3.5 and later). Key frame (Path) based and fully customizable.","archived":false,"fork":false,"pushed_at":"2020-06-05T11:47:38.000Z","size":880,"stargazers_count":211,"open_issues_count":1,"forks_count":64,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-03T22:58:46.662Z","etag":null,"topics":["animation","animation-controller","c-sharp","winforms"],"latest_commit_sha":null,"homepage":"https://falahati.github.io/WinFormAnimation","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/falahati.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}},"created_at":"2014-02-26T23:21:39.000Z","updated_at":"2025-09-18T03:03:13.000Z","dependencies_parsed_at":"2022-08-27T07:51:37.512Z","dependency_job_id":null,"html_url":"https://github.com/falahati/WinFormAnimation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/falahati/WinFormAnimation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falahati%2FWinFormAnimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falahati%2FWinFormAnimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falahati%2FWinFormAnimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falahati%2FWinFormAnimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falahati","download_url":"https://codeload.github.com/falahati/WinFormAnimation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falahati%2FWinFormAnimation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278239967,"owners_count":25954097,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animation","animation-controller","c-sharp","winforms"],"created_at":"2024-09-24T14:12:36.417Z","updated_at":"2025-10-03T22:58:46.987Z","avatar_url":"https://github.com/falahati.png","language":"C#","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=ramin.graphix@gmail.com\u0026lc=US\u0026item_name=Donate\u0026no_note=0\u0026cn=\u0026curency_code=USD\u0026bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"WinFormAnimation/Icon.png\" width=\"42\" alt=\"Icon\"\u003e WinForm Animation Library [.Net3.5+]\n[![](https://img.shields.io/github/license/falahati/WinFormAnimation.svg?style=flat-square)](https://github.com/falahati/WinFormAnimation/blob/master/LICENSE)\n[![](https://img.shields.io/github/commit-activity/y/falahati/WinFormAnimation.svg?style=flat-square)](https://github.com/falahati/WinFormAnimation/commits/master)\n[![](https://img.shields.io/github/issues/falahati/WinFormAnimation.svg?style=flat-square)](https://github.com/falahati/WinFormAnimation/issues)\n\nA simple library for animating controls/values in .Net WinForm (.Net 3.5 and later). Key frame (Path) based and fully customizable.\n\n*Please note that even though this library designed for WinForm but its usage is not limited to WinForm and can be used in other environments. Only reference of the library is to 'System.Drawing' name space.*\n\n## How to get\n[![](https://img.shields.io/nuget/dt/WinFormAnimation.svg?style=flat-square)](https://www.nuget.org/packages/WinFormAnimation)\n[![](https://img.shields.io/nuget/v/WinFormAnimation.svg?style=flat-square)](https://www.nuget.org/packages/WinFormAnimation)\n\nThis library is available as a NuGet package at [nuget.org](https://www.nuget.org/packages/WinFormAnimation/).\n\n## Help me fund my own Death Star\n\n[![](https://img.shields.io/badge/crypto-CoinPayments-8a00a3.svg?style=flat-square)](https://www.coinpayments.net/index.php?cmd=_donate\u0026reset=1\u0026merchant=820707aded07845511b841f9c4c335cd\u0026item_name=Donate\u0026currency=USD\u0026amountf=20.00000000\u0026allow_amount=1\u0026want_shipping=0\u0026allow_extra=1)\n[![](https://img.shields.io/badge/shetab-ZarinPal-8a00a3.svg?style=flat-square)](https://zarinp.al/@falahati)\n[![](https://img.shields.io/badge/usd-Paypal-8a00a3.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=ramin.graphix@gmail.com\u0026lc=US\u0026item_name=Donate\u0026no_note=0\u0026cn=\u0026curency_code=USD\u0026bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted)\n\n**--OR--**\n\nYou can always donate your time by contributing to the project or by introducing it to others..\n\n## Documentation\n\n* `Float2D`: A class containing two `float` values as Vertical and Horizontal coordinates representing a point in a 2D plane.\n* `Float3D`: A class containing three `float` values as Vertical, Horizontal and Depth coordinates representing a point in a 3D plane.\n* `Path`: A class containing a `float` starting and a `float` ending point for a single dimensional animation as well as duration and the function to control the animation.\n* `Path2D`: A class containing a `Float2D` starting and a `Float2D` ending point for a two dimensional animation as well as duration and the function to control the animation.\n* `Path3D`: A class containing a `Float3D` starting and a `Float3D` ending point for a three dimensional animation as well as duration and the function to control the animation.\n* `Animator`: A class for animating an array of `Path` objects. This class is one of the main classes and starting points of a basic animation.\n* `Animator2D`: A class for animating an array of `Path2D` objects. This class is one of the main classes and starting points of a basic animation.\n* `Animator2D`: A class for animating an array of `Path3D` objects. This class is one of the main classes and starting points of a basic animation.\n* `SafeInvoker`: A class holding a reference to a function to invoke in the correct thread, detected by a `Control` object passed to it. Useful for easier UI manipulations.\n* `SafeInvoker\u003cT\u003e`: Same as `SafeInvoker` class but with a generic argument for the function to invoke.\n\nFor full documentation of the classes and their members, please take a look at our doxygen page at [falahati.github.io](https://falahati.github.io/WinFormAnimation/doxygen).\n\n## Basic examples\n### ONE DIMENSIONAL ANIMATION OF A PROPERTY\nFollowing code animates a property named `Value` of a `ProgressBar` named `pb_progress` in 5 seconds from zero to one hundred:\n```C#\nnew Animator(new Path(0, 100, 5000))\n    .Play(pb_progress, Animator.KnownProperties.Value);\n```\n\n### TWO DIMENSIONAL ANIMATION OF A PROPERTY\nFollowing code animates a `Form` in two paths. First one moves the `Form` from (0, -100) to (100, 200) and second path waits for 3 seconds and then moved the `Form` to its initial location in 2 seconds. (`this` is a `Form`)\n```C#\nnew Animator2D(\n        new Path2D(0, 100, -100, 200, 5000).ContinueTo(this.Location.ToFloat2D(), 2000, 3000))\n    .Play(this, Animator2D.KnownProperties.Location);\n```\n\n### THREE DIMENSIONAL ANIMATION OF A PROPERTY\nFollowing code animates a property named `CustomColor` of a `Control` named `c_customLabel` in 2 seconds and after a delay of 1 second using the `AnimationFunctions.CubicEaseIn` function and with maximum of 10 frames per second.\n```C#\nnew Animator3D(\n        new Path3D(Color.Blue.ToFloat3D(), Color.Red.ToFloat3D(), 2000, 1000, AnimationFunctions.CubicEaseIn), \n        FPSLimiterKnownValues.LimitTen)\n    .Play(c_customLabel, \"CustomColor\");\n```\n\n\n### KEYFRAMES\nThere are extension methods for `Path`, `Path2D`, `Path3D` and their arrays to let you continue the path easily and define the key frames as fast as possible. For example, following code moves a `Control` named `c_control` in a rectangular path infinitely:\n```C#\nnew Animator2D(\n    new Path2D(new Float2D(100, 100), new Float2D(200, 100), 1000)\n        .ContinueTo(new Float2D(200, 200), 1000)\n        .ContinueTo(new Float2D(100, 200), 1000)\n        .ContinueTo(new Float2D(100, 100), 1000))\n{\n    Repeat = true\n}.Play(c_control, Animator2D.KnownProperties.Location);\n```\n\n### CALLBACKS\nIt is possible to define a custom callback as frame handler as well as defining a call back to handle the end of the animation. Following example will call a method named `CustomSetMethod` for setting new values and handle the frames, and starts the animation in reverse path after its end for one more time:\n\n```C#\nvar animator = new Animator(new Path(100, 200, 1000).ContinueTo(400, 500));\nanimator.Play(new SafeInvoker\u003cfloat\u003e(CustomSetMethod), new SafeInvoker(() =\u003e\n{\n    animator.Paths = animator.Paths.Select(path =\u003e path.Reverse()).Reverse().ToArray();\n    animator.Play(new SafeInvoker\u003cfloat\u003e(CustomSetMethod));\n}));\n```\n\n## Demo\nCheck the 'WinFormAnimation.Samples' project for simple usage examples.\n![Screenshot](/screenshot.gif?raw=true \"Screenshot\")\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) 2016-2020 Soroush Falahati\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalahati%2Fwinformanimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalahati%2Fwinformanimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalahati%2Fwinformanimation/lists"}