VisualTransition.GeneratedEasingFunction property

Applies to Windows and Windows Phone

Gets or sets the easing function applied to the generated animations.

Syntax


public EasingFunctionBase GeneratedEasingFunction { get; set; }

Property value

Type: EasingFunctionBase

An easing function implementation that is applied to the generated animations.

Remarks

A VisualTransition typically uses a linear interpolation to control the implicit transition animations that happen over the GeneratedDuration. Setting a value for GeneratedEasingFunction changes this linear behavior and instead applies the timing logic of a particular EasingFunctionBase derived class to the interpolation. For example, if you wanted an interpolation rate to start off slowly and reach the To value rapidly at the end of the transition's duration, you might set GeneratedEasingFunction using a PowerEase with EasingMode.EaseIn.

Examples

This XAML example shows the markup for applying a QuadraticEase easing function to the interpolation of implicit transition animations during the transition. Setting the EasingMode is important if you don't want the default easing mode for all easing functions, which is EasingMode.EaseIn.



<!--template root-->
<VisualStateManager.VisualStateGroups>
  <VisualStateGroup x:Name="States">
    <VisualState x:Name="FirstState">
       <!--state logic omitted-->
    </VisualState>
    <VisualState x:Name="SecondState">
       <!--state logic omitted-->
    </VisualState>
    <VisualStateGroup.Transitions>
      <VisualTransition To="SecondState" GeneratedDuration="0:0:10">
        <VisualTransition.GeneratedEasingFunction>
          <QuadraticEase EasingMode="EaseOut"/>
        </VisualTransition.GeneratedEasingFunction>
      </VisualTransition>
    </VisualStateGroup.Transitions>
  </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

See also

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

 

 

Show:
© 2014 Microsoft. All rights reserved.