ExponentialEase 類別

定義

表示 easing 函式,這個函式會使用指數公式建立可加速和/或減速的動畫。

public ref class ExponentialEase sealed : EasingFunctionBase
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ExponentialEase final : EasingFunctionBase
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class ExponentialEase final : EasingFunctionBase
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ExponentialEase : EasingFunctionBase
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ExponentialEase : EasingFunctionBase
Public NotInheritable Class ExponentialEase
Inherits EasingFunctionBase
<ExponentialEase .../>
繼承
Object Platform::Object IInspectable DependencyObject EasingFunctionBase ExponentialEase
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

此 XAML 範例會將 ExponentialEase easing 函式套用至 DoubleAnimation ,以建立遞減動畫。

<StackPanel x:Name="LayoutRoot" >
    <StackPanel.Resources>
        <Storyboard x:Name="myStoryboard">
            <DoubleAnimation From="1" To="6" Duration="00:00:3" 
                Storyboard.TargetName="rectScaleTransform" 
                Storyboard.TargetProperty="ScaleY">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase Exponent="6" EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

    <Rectangle PointerPressed="Pointer_Clicked" 
     Fill="Blue" Width="200" Height="30">
        <Rectangle.RenderTransform>
            <ScaleTransform x:Name="rectScaleTransform" />
        </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

備註

ExponentialEase 是一個 Easing 函式,其具有一個函式逐一公式,其使用 指數 值來塑造函式經過時間曲線。 用於 指數 的值會變更曲線的形狀相當多。 指數 可以是負數,如果函式的作用有點像將 EasingMode 變更為具有正值的 EaseOut 。 使用這個 Easing 函式時,您可能會想要實驗 ExponentEasingMode 的不同值。

Easing 函式可以套用至From/To/By動畫的EasingFunction屬性,或套用至用於主要畫面格動畫之 Easing變體的主要畫面格類型的EasingFunction屬性。 如需詳細資訊,請參閱 主要畫面格動畫和 Easing 函式動畫

建構函式

ExponentialEase()

初始化 ExponentialEase 類別的新實例。

屬性

Dispatcher

取得與此物件相關聯的 CoreDispatcherCoreDispatcher代表可以存取 UI 執行緒上DependencyObject的功能,即使程式碼是由非 UI 執行緒起始也一樣。

(繼承來源 DependencyObject)
EasingMode

取得或設定值,這個值會指定動畫如何進行插補。

(繼承來源 EasingFunctionBase)
Exponent

取得或設定用於決定動畫插補的指數。

ExponentProperty

識別 Exponent 相依性屬性。

方法

ClearValue(DependencyProperty)

清除相依性屬性的本機值。

(繼承來源 DependencyObject)
Ease(Double)

轉換標準化時間以控制動畫的步調。

(繼承來源 EasingFunctionBase)
GetAnimationBaseValue(DependencyProperty)

傳回針對相依性屬性所建立的任何基底值,如果動畫未使用中,則會套用。

(繼承來源 DependencyObject)
GetValue(DependencyProperty)

DependencyObject傳回相依性屬性的目前有效值。

(繼承來源 DependencyObject)
ReadLocalValue(DependencyProperty)

如果已設定本機值,則傳回相依性屬性的本機值。

(繼承來源 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

註冊通知函式,以接聽此DependencyObject實例上特定DependencyProperty的變更。

(繼承來源 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject上設定相依性屬性的本機值。

(繼承來源 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消先前透過呼叫 RegisterPropertyChangedCallback註冊的變更通知。

(繼承來源 DependencyObject)

適用於

另請參閱