FadeInThemeAnimation Class

Definition

Represents the preconfigured opacity animation that applies to controls when they are first shown.

public ref class FadeInThemeAnimation sealed : Timeline
/// [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 FadeInThemeAnimation final : Timeline
/// [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 FadeInThemeAnimation final : Timeline
[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 FadeInThemeAnimation : Timeline
[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 FadeInThemeAnimation : Timeline
Public NotInheritable Class FadeInThemeAnimation
Inherits Timeline
<FadeInThemeAnimation ... />
Inheritance
Object Platform::Object IInspectable DependencyObject Timeline FadeInThemeAnimation
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

The following example applies a FadeInThemeAnimation and FadeOutThemeAnimation to a 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();
}

Constructors

FadeInThemeAnimation()

Initializes a new instance of the FadeInThemeAnimation class.

Properties

AutoReverse

Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration.

(Inherited from Timeline)
BeginTime

Gets or sets the time at which this Timeline should begin.

(Inherited from Timeline)
Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
Duration

Gets or sets the length of time for which this timeline plays, not counting repetitions.

(Inherited from Timeline)
FillBehavior

Gets or sets a value that specifies how the animation behaves after it reaches the end of its active period.

(Inherited from Timeline)
RepeatBehavior

Gets or sets the repeating behavior of this timeline.

(Inherited from Timeline)
SpeedRatio

Gets or sets the rate, relative to its parent, at which time progresses for this Timeline.

(Inherited from Timeline)
TargetName

Gets or sets the reference name of the control element being targeted.

TargetNameProperty

Identifies the TargetName dependency property.

Methods

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Events

Completed

Occurs when the Storyboard object has completed playing.

(Inherited from Timeline)

Applies to

See also