CircleEase 類別

定義

表示緩動函式,這個函式會利用循環函式來建立加速和 (或) 減速的動畫。

public ref class CircleEase 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 CircleEase 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 CircleEase 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 CircleEase : 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 CircleEase : EasingFunctionBase
Public NotInheritable Class CircleEase
Inherits EasingFunctionBase
<CircleEase .../>
繼承
Object Platform::Object IInspectable DependencyObject EasingFunctionBase CircleEase
屬性

Windows 需求

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

範例

這個 XAML 範例會將 CircleEase 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" EnableDependentAnimation="True">
                <DoubleAnimation.EasingFunction>
                    <CircleEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

        <Rectangle x:Name="myRectangle" 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

備註

CircleEase 是一種 Easing 函式,其具有與函式時間圖表表示時類似余弦曲線的函式。 當 EasingModeEaseIn (預設) 時,此 Easing 函式會啟動緩慢,並在到達結尾時逐漸加速。 在持續時間的一半達到大約 15% 的值。

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

用於此函式的公式為:

f (t) 等於 1 減平方根減去 t 平方的公式

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

建構函式

CircleEase()

初始化 CircleEase 類別的新實例。

屬性

Dispatcher

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

(繼承來源 DependencyObject)
EasingMode

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

(繼承來源 EasingFunctionBase)

方法

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)

適用於

另請參閱