BackEase.Amplitude 属性

定义

获取或设置与 BackEase 动画关联的收回幅度。

public:
 property double Amplitude { double get(); void set(double value); };
double Amplitude();

void Amplitude(double value);
public double Amplitude { get; set; }
var double = backEase.amplitude;
backEase.amplitude = double;
Public Property Amplitude As Double
<BackEase Amplitude="double" .../>

属性值

Double

double

BackEase 动画关联的收回幅度。 此值必须大于等于 0。 默认值为 1。

示例

以下示例将 BackEase 缓动函数应用于 DoubleAnimation ,以创建在动画开头和结尾稍微回退的动画。

<StackPanel x:Name="LayoutRoot" >
    <StackPanel.Resources>
        <Storyboard x:Name="myStoryboard">
                <DoubleAnimation From="1" To="2" Duration="00:00:1" 
                Storyboard.TargetName="myScaleTransform" 
                Storyboard.TargetProperty="ScaleX">
                <DoubleAnimation.EasingFunction>
                    <BackEase Amplitude="0.3" EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

    <Rectangle Margin="60" x:Name="myRectangle" PointerPressed="Pointer_Clicked" 
     Fill="Blue" Width="50" Height="50" >
        
        <Rectangle.RenderTransform>
            <ScaleTransform x:Name="myScaleTransform" />
        </Rectangle.RenderTransform>
        
    </Rectangle>
</StackPanel>
// When the user clicks the rectangle, the animation
// begins. 
private void Pointer_Clicked(object sender, PointerRoutedEventArgs e)
{
    myStoryboard.Begin();
}
' When the user clicks the rectangle, the animation
' begins. 
Private Sub Pointer_Clicked(ByVal sender As Object, ByVal e As PointerRoutedEventArgs)
    myStoryboard.Begin()
End Sub

适用于