共用方式為


BackEase.Amplitude 屬性

定義

取得或設定與 BackEase 動畫關聯之撤回的幅度。

public:
 property double Amplitude { double get(); void set(double value); };
public double Amplitude { get; set; }
member this.Amplitude : double with get, set
Public Property Amplitude As Double

屬性值

BackEase 動畫關聯之撤回的幅度。 這個值必須大於或等於 0。

預設值為 1。

範例

下列範例會將 BackEase Easing 函式套用至 DoubleAnimation ,以建立在動畫開頭和結尾稍微撤銷的動畫。

<Rectangle Name="MyRectangle" Margin="60" Width="50" Height="50" Fill="Blue">
      <Rectangle.Triggers>
          <EventTrigger RoutedEvent="Rectangle.MouseDown">
              <BeginStoryboard>
                  <Storyboard>
                      <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>
                      <DoubleAnimation From="1" To="2" Duration="00:00:1" 
                     Storyboard.TargetName="myScaleTransform" 
                     Storyboard.TargetProperty="ScaleY">
                          <DoubleAnimation.EasingFunction>
                              <BackEase Amplitude="0.3" EasingMode="EaseInOut" />
                          </DoubleAnimation.EasingFunction>
                      </DoubleAnimation>

                  </Storyboard>
              </BeginStoryboard>
          </EventTrigger>
      </Rectangle.Triggers>
      <Rectangle.RenderTransform>
          <ScaleTransform x:Name="myScaleTransform" />
      </Rectangle.RenderTransform>

  </Rectangle>

備註

相依性屬性識別碼欄位: AmplitudeProperty

幅度越大,動畫之前和/或之後的撤銷愈大。

示範不同的幅度值。

XAML Attribute Usage

<object Amplitude="double" .../>  

適用於