EleCho.FluentAnimation.Wpf 1.0.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package EleCho.FluentAnimation.Wpf --version 1.0.1
NuGet\Install-Package EleCho.FluentAnimation.Wpf -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EleCho.FluentAnimation.Wpf" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EleCho.FluentAnimation.Wpf --version 1.0.1
#r "nuget: EleCho.FluentAnimation.Wpf, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EleCho.FluentAnimation.Wpf as a Cake Addin
#addin nuget:?package=EleCho.FluentAnimation.Wpf&version=1.0.1

// Install EleCho.FluentAnimation.Wpf as a Cake Tool
#tool nuget:?package=EleCho.FluentAnimation.Wpf&version=1.0.1

EleCho.FluentAnimation

Use Fluent APIs to process animations in WPF.

Usage

Add namespace using.

using EleCho.FluentAnimation.Wpf

Call the extension method FluentAnimator, it returns a FluentAnimator instance for processing animations.

element.FluentAnimator();

Call AnimateBy, AnimateTo, AnimateFromBy, AnimateFromTo methods to process an animation, then call Start method to start these animations.

element.FluentAnimator()
    .AnimateTo(ele => ele.Width, 100)
    .AnimateTo(ele => ele.Height, 100)
    .Start();

You can also directly use some wrapped methods for commonly used attributes, such as AnimateWidthTo, AnimateHeightTo.

element.FluentAnimator()
    .AnimateWidthTo(100)
    .AnimateHeightTo(100)
    .Start();

You can use methods such as WithDuration, WithEasingFunction to configure all animations.

element.FluentAnimator()
    .AnimateWidthTo(100)
    .AnimateHeightTo(100)
    .WithDuration(200)      // 200ms
    .WithEasingFunction(
        new CircleEase() { EasingMode = EasingMode.EaseOut })
    .Start();

You can use Delay or Then to control the order of execution of animations.

element.FluentAnimator()
    .AnimateWidthTo(100)
    .Delay(100)             // delay for 100ms
    .AnimateHeightTo(100)
    .WithDuration(200)      // 200ms
    .Start();

element.FluentAnimator()
    .AnimateWidthTo(100, TimeSpan.FromMilliseconds(200))     // to use continue, you must specify the duration
    .Then()                                                  // delay for the duration of the previous animation
    .AnimateHeightTo(100, TimeSpan.FromMilliseconds(200))    // run the current animation
    .Start();

Animation with attached property.

element.FluentAnimator()
    .AnimateTo(Canvas.LeftProperty, (double)200)
    .WithDuration(200)
    .Start();

Animation with nesting properties.

element.FluentAnimator()
    .AnimateTo(ele => ((SolidColorBrush)ele.Background).Color, Colors.Pink)
    .WithDuration(200)
    .Start();
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 185 4/13/2023
1.0.0 177 4/4/2023