PowerEase.Power Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the exponential power of the animation interpolation. For example, a value of 7 creates an animation interpolation curve that follows the formula f(t) = t7.
Namespace: System.Windows.Media.Animation
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
Syntax
Public Property Power As Double
public double Power { get; set; }
<PowerEase Power="double" .../>
Property Value
Type: System..::.Double
The exponential power of the animation interpolation. This value must be greater or equal to 0. The default is 2.
Remarks
Dependency property identifier field: PowerProperty
Examples
The following example applies a PowerEase easing function with a Power property value of 20 to a DoubleAnimation to create a decelerating animation. Because the Power value is so high, the deceleration is sudden compared to if you used a lower value.
<StackPanel x:Name="LayoutRoot" Background="Transparent">
<StackPanel.Resources>
<Storyboard x:Name="myStoryboard">
<DoubleAnimation From="30" To="200" Duration="00:00:3"
Storyboard.TargetName="myRectangle"
Storyboard.TargetProperty="Height">
<DoubleAnimation.EasingFunction>
<PowerEase Power="20" EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</StackPanel.Resources>
<Rectangle x:Name="myRectangle" MouseLeftButtonDown="Mouse_Clicked"
Fill="Blue" Width="200" Height="30" />
</StackPanel>
' When the user clicks the rectangle, the animation
' begins.
Private Sub Mouse_Clicked(ByVal sender As Object, ByVal e As MouseEventArgs)
myStoryboard.Begin()
End Sub
// When the user clicks the rectangle, the animation
// begins.
private void Mouse_Clicked(object sender, MouseEventArgs e)
{
myStoryboard.Begin();
}
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone