The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VisualTransition.GeneratedDuration property

Gets or sets the amount of time it takes to move from one state to another, and the time that any implicit transition animations should run as part of the transition behavior.


public Duration GeneratedDuration { get; set; }

<object GeneratedDuration="duration"/>

Property value

Type: Duration

The amount of time it takes to move from one state to another.


GeneratedDuration is mainly for controlling implicit transitions. If you want your transition animations to be limited only to the specific animations in your Storyboard, you don't to set a value for GeneratedDuration. Instead, set specific Duration values on the animations in the Storyboard or the main Storyboard element within it. If you do set a GeneratedDuration value, it won't truncate or change any Storyboard with a Duration value; the total length of the transition is the longest Duration value that you've set in the animations for Storyboard, or the GeneratedDuration, whichever is longer.

Implicit transitions

You can define a VisualTransition such that it has a GeneratedDuration, but does not have any specific dependency properties being targeted and animated in its Storyboard value. This creates an implicit transition. Any dependency property that is specifically targeted for animation in either the From orTo visual states and thus has different values across the state change will use a generated transition animation. This generated animation transitions between the From state value and the To state value using interpolation, and lasts for the time stated by GeneratedDuration. This only works if there can be a DoubleAnimation, PointAnimation or ColorAnimation on a dependency property, for more info, see Remarks in VisualTransition.

By default, an implicit transition animation uses linear interpolation to animate a value through the GeneratedDuration. You can change the linear interpolation to an interpolation behavior of your choice by setting GeneratedEasingFunction as well as GeneratedDuration on a VisualTransition.


This example specifies that the control takes one half second to go into the "PointerOver" state.

<!--Take one half second to transition to the PointerOver state.-->
<VisualTransition To="PointerOver" 
                      GeneratedDuration="0:0:0.5" />

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::UI::Xaml [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]


Windows::UI::Xaml [C++]



See also

Key-frame animations and easing function animations
Quickstart: Control templates
Storyboarded animations
Storyboarded animations for visual states