Windows Dev Center

FadeInThemeAnimation Class

Représente l'animation d'opacité préconfigurée qui s'applique aux contrôles lors de leur premier affichage.

Héritage

Object
  DependencyObject
    Timeline
      FadeInThemeAnimation

Syntaxe


public sealed class FadeInThemeAnimation : Timeline


<FadeInThemeAnimation ... />

Attributs

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Membres

FadeInThemeAnimationClasse possède ces types de membres :

Constructeurs

FadeInThemeAnimationClasse possède ces constructeurs.

ConstructeurDescription
FadeInThemeAnimation Initializes a new instance of the FadeInThemeAnimation class.

 

Événements

FadeInThemeAnimationClasse possède ces événements.

ÉvénementDescription
Completed Occurs when the Storyboard object has completed playing. (Hérité de Timeline)

 

Méthodes

The FadeInThemeAnimation Classe a les méthodes suivantes. Elle hérite également des méthodes de Object Classe.

MéthodeDescription
ClearValue Clears the local value of a dependency property. (Hérité de DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Hérité de DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Hérité de DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Hérité de DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Hérité de DependencyObject)

 

Propriétés

Le FadeInThemeAnimationClasse a les propriétés suivantes.

PropriétéType d'accèsDescription

AutoReverse

Lecture/écritureGets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration. (Hérité de Timeline)

BeginTime

Lecture/écritureGets or sets the time at which this Timeline should begin. (Hérité de Timeline)

Dispatcher

En lecture seuleGets the CoreDispatcher that this object is associated with. (Hérité de DependencyObject)

Duration

Lecture/écritureGets or sets the length of time for which this timeline plays, not counting repetitions. (Hérité de Timeline)

FillBehavior

Lecture/écritureGets or sets a value that specifies how the animation behaves after it reaches the end of its active period. (Hérité de Timeline)

RepeatBehavior

Lecture/écritureGets or sets the repeating behavior of this timeline. (Hérité de Timeline)

SpeedRatio

Lecture/écritureGets or sets the rate, relative to its parent, at which time progresses for this Timeline. (Hérité de Timeline)

TargetName

Lecture/écritureGets or sets the reference name of the control element being targeted.

TargetNameProperty

En lecture seuleIdentifies the TargetName dependency property.

 

Exemples

L'exemple suivant applique un FadeInThemeAnimation et un FadeOutThemeAnimation à un rectangle.


<StackPanel>
    <StackPanel.Resources>

        <!-- Theme animations like this can use the default behavior like
             this example or you could use properties like BeginTime and 
             Duration to tweak when and how quickly the animation occures. 
             If you want more control over a fade animation (e.g. just partial
             fade), you will need to use DoubleAnimation to animate the Opacity 
             property of the element you want to fade in or out. -->
        <Storyboard x:Name="EnterStoryboard">
            <FadeOutThemeAnimation Storyboard.TargetName="myRectangle" />
        </Storyboard>
        <Storyboard x:Name="ExitStoryboard">
            <FadeInThemeAnimation Storyboard.TargetName="myRectangle" />
        </Storyboard>
    </StackPanel.Resources>
    <Rectangle x:Name="myRectangle" 
               PointerEntered="Rectangle_PointerEntered" 
               PointerExited="Rectangle_PointerExited"   
               Fill="Blue" Width="200" Height="300" />
</StackPanel>



// When the pointer enters the rectangle space, the animation begins.
private void Rectangle_PointerEntered(object sender, PointerRoutedEventArgs e)
{
    EnterStoryboard.Begin();
}

private void Rectangle_PointerExited(object sender, PointerRoutedEventArgs e)
{
    ExitStoryboard.Begin();
}


Conditions requises

Client minimal pris en charge

Windows 8 [Applications Windows Store uniquement]

Serveur minimal pris en charge

Windows Server 2012 [Applications Windows Store uniquement]

Espace de noms

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

Métadonnées

Windows.winmd

Voir aussi

Timeline
Animation des fondus
Instructions et liste de contrôle pour les animations de fondus

 

 

Afficher:
© 2015 Microsoft