FadeOutThemeAnimation Class

Rappresenta l'animazione preconfigurata di opacità che si applica ai controlli quando vengono nascosti o rimossi dall'interfaccia utente.

Ereditarietà

Object
  DependencyObject
    Timeline
      FadeOutThemeAnimation

Sintassi


public ref class FadeOutThemeAnimation sealed : Timeline

Attributi

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

Membri

FadeOutThemeAnimationClasse include questi tipi di membri:

Costruttori

FadeOutThemeAnimationClasse include questi costruttori.

CostruttoreDescrizione
FadeOutThemeAnimation Initializes a new instance of the FadeOutThemeAnimation class.

 

Eventi

FadeOutThemeAnimationClasse include questi eventi.

EventoDescrizione
Completed Occurs when the Storyboard object has completed playing. (Ereditata da Timeline)

 

Metodi

The FadeOutThemeAnimation Classe dispone di tali metodi. Eredita inoltre i metodi da Object Classe.

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

 

Proprietà

Classe dispone di tali proprietà. di FadeOutThemeAnimation

ProprietàTipo di accessoDescrizione

AutoReverse

Lettura/scritturaGets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration. (Ereditata da Timeline)

BeginTime

Lettura/scritturaGets or sets the time at which this Timeline should begin. (Ereditata da Timeline)

Dispatcher

Sola letturaGets the CoreDispatcher that this object is associated with. (Ereditata da DependencyObject)

Duration

Lettura/scritturaGets or sets the length of time for which this timeline plays, not counting repetitions. (Ereditata da Timeline)

FillBehavior

Lettura/scritturaGets or sets a value that specifies how the animation behaves after it reaches the end of its active period. (Ereditata da Timeline)

RepeatBehavior

Lettura/scritturaGets or sets the repeating behavior of this timeline. (Ereditata da Timeline)

SpeedRatio

Lettura/scritturaGets or sets the rate, relative to its parent, at which time progresses for this Timeline. (Ereditata da Timeline)

TargetName

Lettura/scritturaGets or sets the reference name of the control element being targeted.

TargetNameProperty

Sola letturaIdentifies the TargetName dependency property.

 

Esempi

Nell'esempio seguente vengono applicate una FadeInThemeAnimation e una FadeOutThemeAnimation a un rettangolo.


<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();
}


Requisiti

Client supportato minimo

Windows 8 [Solo applicazioni Windows Store]

Server supportato minimo

Windows Server 2012 [Solo applicazioni Windows Store]

Spazio dei nomi

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

Metadati

Windows.winmd

Vedere anche

Timeline
Animazione delle dissolvenze
Linee guida ed elenco di controllo per animazioni di dissolvenza

 

 

Mostra:
© 2014 Microsoft