CircleEase Classe
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Représente une fonction d’accélération qui crée une animation qui accélère et/ou décélére à l’aide d’une fonction circulaire.
public ref class CircleEase sealed : EasingFunctionBase
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 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.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CircleEase : EasingFunctionBase
Public NotInheritable Class CircleEase
Inherits EasingFunctionBase
<CircleEase .../>
- Héritage
- Attributs
Exemples
Cet exemple XAML applique une fonction d’accélération CircleEase à une DoubleAnimation pour créer une animation décélération.
<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();
}
Remarques
CircleEase est une fonction d’accélération qui a une formule de fonction au fil du temps qui ressemble à une courbe cosinus lorsqu’elle est représentée en tant que graphique de temps de fonction. Lorsque EasingMode est EaseIn (valeur par défaut), cette fonction d’accélération démarre lentement et accélère progressivement à mesure qu’elle atteint la fin. Il atteint environ 15% valeur à mi-chemin dans la durée.
Une fonction d’accélération peut être appliquée aux propriétés EasingFunction des animations From/To/By ou aux propriétés EasingFunction des types d’images clés utilisées pour les variantes d’accélération des animations d’images clés. Pour plus d’informations, consultez animations d’images clés et animations de fonction d’accélération.
La formule utilisée pour cette fonction est la suivante :
Une fonction d’accélération peut être appliquée aux propriétés EasingFunction des animations From/To/By ou aux propriétés EasingFunction des types d’images clés utilisées pour les variantes d’accélération des animations d’images clés. Pour plus d’informations, consultez animations d’images clés et animations de fonction d’accélération.
Constructeurs
| Nom | Description |
|---|---|
| CircleEase() |
Initialise une nouvelle instance de la classe CircleEase . |
Propriétés
| Nom | Description |
|---|---|
| Dispatcher |
Retourne |
| DispatcherQueue |
Obtient le |
| EasingMode |
Obtient ou définit une valeur qui spécifie comment l’animation interpole. (Hérité de EasingFunctionBase) |
Méthodes
| Nom | Description |
|---|---|
| ClearValue(DependencyProperty) |
Efface la valeur locale d’une propriété de dépendance. (Hérité de DependencyObject) |
| Ease(Double) |
Transforme le temps normalisé pour contrôler le rythme d’une animation. (Hérité de EasingFunctionBase) |
| GetAnimationBaseValue(DependencyProperty) |
Retourne toute valeur de base établie pour une propriété de dépendance, qui s’applique dans les cas où une animation n’est pas active. (Hérité de DependencyObject) |
| GetValue(DependencyProperty) |
Retourne la valeur effective actuelle d’une propriété de dépendance à partir d’un DependencyObject. (Hérité de DependencyObject) |
| ReadLocalValue(DependencyProperty) |
Retourne la valeur locale d’une propriété de dépendance, si une valeur locale est définie. (Hérité de DependencyObject) |
| RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback) |
Inscrit une fonction de notification pour écouter les modifications apportées à une dependencyProperty spécifique sur cette instance DependencyObject . (Hérité de DependencyObject) |
| SetValue(DependencyProperty, Object) |
Définit la valeur locale d’une propriété de dépendance sur un DependencyObject. (Hérité de DependencyObject) |
| UnregisterPropertyChangedCallback(DependencyProperty, Int64) |
Annule une notification de modification qui a été précédemment inscrite en appelant RegisterPropertyChangedCallback. (Hérité de DependencyObject) |