All Projects → falahati → Winformanimation

falahati / Winformanimation

Licence: mit
A simple library for animating controls/values in .Net WinForm (.Net 3.5 and later). Key frame (Path) based and fully customizable.

Projects that are alternatives of or similar to Winformanimation

Bizhawk
BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
Stars: ✭ 1,138 (+624.84%)
Mutual labels:  winforms
Xclwinkits
一个实用的windows小工具集合,里面包含了多个常用的小软件。其中的批量修改文件名及文件内容功能,可以自定义修改规则,支持规则的导入与导出。不需要安装Office软件,支持Excel/Word/Txt等文件的文件名或文件内容的批量修改操作。另外还包括正则表达式测试小工具、字符串转js常量工具、加密与解密和日期时间差等,您也可以很方便地扩展相关功能。
Stars: ✭ 87 (-44.59%)
Mutual labels:  winforms
Winforms
A collection of custom Controls for Windows.Forms
Stars: ✭ 115 (-26.75%)
Mutual labels:  winforms
Logbert
Logbert is an advanced log message viewer for log4net, log4j and others.
Stars: ✭ 70 (-55.41%)
Mutual labels:  winforms
Krypton Net 5.470
A update to Component factory's krypton toolkit to support the .NET 4.7 framework.
Stars: ✭ 79 (-49.68%)
Mutual labels:  winforms
Musicdecryptor
酷狗、网易等音乐缓存文件转mp3
Stars: ✭ 100 (-36.31%)
Mutual labels:  winforms
Cefsharp
.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
Stars: ✭ 8,440 (+5275.8%)
Mutual labels:  winforms
Ookii Dialogs Winforms
Common dialog classes for Windows Forms applications
Stars: ✭ 130 (-17.2%)
Mutual labels:  winforms
Quick Screen Recorder
Lightweight desktop screen recorder for Windows.
Stars: ✭ 80 (-49.04%)
Mutual labels:  winforms
Imagelistview
A .NET listview control for image files with asynchronously loaded thumbnails.
Stars: ✭ 113 (-28.03%)
Mutual labels:  winforms
Appacker
Tool for making single .exe application packages
Stars: ✭ 70 (-55.41%)
Mutual labels:  winforms
Bedrock
a plugin framework for winform application
Stars: ✭ 74 (-52.87%)
Mutual labels:  winforms
Cropper
Point and shoot screen captures
Stars: ✭ 100 (-36.31%)
Mutual labels:  winforms
Jsoncsharpclassgenerator
JsonCSharpClassGenerator from http://jsonclassgenerator.codeplex.com/
Stars: ✭ 70 (-55.41%)
Mutual labels:  winforms
Winhtmleditor
one html editor for winform(.net)
Stars: ✭ 127 (-19.11%)
Mutual labels:  winforms
Mvvmfx
MVVM for Wisej and Windows Forms - Caliburn.Micro and Bound controls libraries
Stars: ✭ 50 (-68.15%)
Mutual labels:  winforms
Reactivemvvm
Cross-platform ReactiveUI sample app built for a talk at MSK .NET conf.
Stars: ✭ 94 (-40.13%)
Mutual labels:  winforms
Netsparkle
NetSparkle is a C# software update framework for .NET developers compatible with .NET Core, WinForms, WPF, and Avalonia; uses Ed25519 or DSA signatures! View basic usage here in the README or visit our website for code docs. 2.0 is stable but still in preview.
Stars: ✭ 154 (-1.91%)
Mutual labels:  winforms
Tweetduck
A Windows Client for TweetDeck. Not affiliated with Twitter.
Stars: ✭ 128 (-18.47%)
Mutual labels:  winforms
Realtaiizor
C# WinForm UI/UX Component Library
Stars: ✭ 109 (-30.57%)
Mutual labels:  winforms

Icon WinForm Animation Library [.Net3.5+]

A simple library for animating controls/values in .Net WinForm (.Net 3.5 and later). Key frame (Path) based and fully customizable.

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.

How to get

This library is available as a NuGet package at nuget.org.

Help me fund my own Death Star

--OR--

You can always donate your time by contributing to the project or by introducing it to others..

Documentation

  • Float2D: A class containing two float values as Vertical and Horizontal coordinates representing a point in a 2D plane.
  • Float3D: A class containing three float values as Vertical, Horizontal and Depth coordinates representing a point in a 3D plane.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • SafeInvoker<T>: Same as SafeInvoker class but with a generic argument for the function to invoke.

For full documentation of the classes and their members, please take a look at our doxygen page at falahati.github.io.

Basic examples

ONE DIMENSIONAL ANIMATION OF A PROPERTY

Following code animates a property named Value of a ProgressBar named pb_progress in 5 seconds from zero to one hundred:

new Animator(new Path(0, 100, 5000))
    .Play(pb_progress, Animator.KnownProperties.Value);

TWO DIMENSIONAL ANIMATION OF A PROPERTY

Following 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)

new Animator2D(
        new Path2D(0, 100, -100, 200, 5000).ContinueTo(this.Location.ToFloat2D(), 2000, 3000))
    .Play(this, Animator2D.KnownProperties.Location);

THREE DIMENSIONAL ANIMATION OF A PROPERTY

Following 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.

new Animator3D(
        new Path3D(Color.Blue.ToFloat3D(), Color.Red.ToFloat3D(), 2000, 1000, AnimationFunctions.CubicEaseIn), 
        FPSLimiterKnownValues.LimitTen)
    .Play(c_customLabel, "CustomColor");

KEYFRAMES

There 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:

new Animator2D(
    new Path2D(new Float2D(100, 100), new Float2D(200, 100), 1000)
        .ContinueTo(new Float2D(200, 200), 1000)
        .ContinueTo(new Float2D(100, 200), 1000)
        .ContinueTo(new Float2D(100, 100), 1000))
{
    Repeat = true
}.Play(c_control, Animator2D.KnownProperties.Location);

CALLBACKS

It 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:

var animator = new Animator(new Path(100, 200, 1000).ContinueTo(400, 500));
animator.Play(new SafeInvoker<float>(CustomSetMethod), new SafeInvoker(() =>
{
    animator.Paths = animator.Paths.Select(path => path.Reverse()).Reverse().ToArray();
    animator.Play(new SafeInvoker<float>(CustomSetMethod));
}));

Demo

Check the 'WinFormAnimation.Samples' project for simple usage examples. Screenshot

License

The MIT License (MIT)

Copyright (c) 2016-2020 Soroush Falahati

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].