Timeline.DecelerationRatio 屬性

定義

取得或設定值,指定時間軸的 Duration 在從其最大速率減速至零所經過時間的百分比。

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

屬性值

介於 0 和 1 (含) 之間的值,指定時間軸的 Duration 在從其最大速率減速至零所經過時間的百分比。 如果時間軸 AccelerationRatio 屬性也已設定,則 DecelerationRatioAccelerationRatio 總和必須小於或等於 1。 預設值為 0。

例外狀況

DecelerationRatio 小於 0 或大於 1。

備註

DecelerationRatio使用 屬性來建立動畫,以在停止之前變慢。 屬性 DecelerationRatio 有助於建立輕鬆的效果,或讓移動看起來更自然。 AccelerationRatio使用 和 DecelerationRatio 屬性來建立動畫,以開始緩慢、加速,然後在完成之前再次變慢。

相依性屬性資訊

識別碼欄位 DecelerationRatioProperty
設定為 的中繼資料屬性 true

適用於

另請參閱