Bagikan melalui


BackEase.Amplitude Properti

Definisi

Mendapatkan atau mengatur amplitude pencabutan yang terkait dengan animasi 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" .../>

Nilai Properti

Double

double

Amplitude pencabutan yang terkait dengan animasi BackEase . Nilai ini harus lebih besar dari atau sama dengan 0. Defaultnya adalah 1.

Contoh

Contoh berikut menerapkan fungsi pelonggaran BackEase ke DoubleAnimation untuk membuat animasi yang sedikit menarik di awal dan akhir animasi.

<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

Berlaku untuk