creating-wpf-animations

Creates WPF animations using Storyboard, Timeline, and EasingFunction patterns in XAML and C#.

Updated Nov 22, 2023
One-click install
npx skills add https://github.com/parksanghoon-sys/TestCode --skill creating-wpf-animations-parksanghoon-sys
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: creating-wpf-animations
Source: https://github.com/parksanghoon-sys/TestCode/tree/main/src/Modbus/wpf-dev-pack/.agents/skills/creating-wpf-animations
Command: npx skills add https://github.com/parksanghoon-sys/TestCode --skill creating-wpf-animations-parksanghoon-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Implementing UI transitions, state change visualizations, and interactive feedback effects in WPF requires knowing the correct combination of Storyboard, Timeline, Animation types, and EasingFunctions, which is error-prone when written from scratch. ## Core Features & Use Cases - XAML Animation Patterns: Provides ready-to-use DoubleAnimation, ColorAnimation, ThicknessAnimation, and keyframe animation markup triggered by events and property triggers. - Code-Behind Animation Helpers: Includes C# helpers for fade-in/fade-out effects, composite Storyboard animations, and an AnimationController supporting pause, resume, stop, and seek. - VisualStateManager Integration: Supplies state-based animation templates for control states such as Normal, MouseOver, and Pressed. - Use Case: When building a WPF dashboard, use this Skill to add a smooth slide-in panel transition with ThicknessAnimation and a hover scale effect with RenderTransform, following performance guidance to avoid layout recalculation. ## Quick Start Ask the AI to create a WPF fade-in animation for a panel using DoubleAnimation and Storyboard with an easing function.

Frequently Asked Questions about creating-wpf-animations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I animate opacity fade-in in WPF using DoubleAnimation?▼

Create a DoubleAnimation with From set to 0 and To set to 1, then call BeginAnimation on the element's OpacityProperty. Adding a QuadraticEase with EaseOut mode produces a smooth decelerating fade effect.

How to trigger a color animation on MouseEnter for a WPF Border?▼

Use an EventTrigger on the MouseEnter routed event containing a BeginStoryboard with a ColorAnimation. Target the Background brush color via the property path (Border.Background).(SolidColorBrush.Color).

Which WPF properties are most efficient to animate?▼

Opacity and RenderTransform are the most efficient because they avoid layout recalculation. Animating Width, Height, or Margin triggers layout passes and performs significantly worse.

Can I pause and resume a WPF Storyboard animation?▼

Yes, call Storyboard.Begin with isControllable set to true, then use the Pause, Resume, Stop, and Seek methods. The AnimationController pattern wraps these calls for a target FrameworkElement.

When should I use keyframe animations instead of basic DoubleAnimation?▼

Use DoubleAnimationUsingKeyFrames when a property must pass through multiple intermediate values at specific times. Linear, spline, easing, and discrete keyframes each control interpolation differently between key times.