FadeOutThemeAnimation FadeOutThemeAnimation FadeOutThemeAnimation Class

Represents the preconfigured opacity animation that applies to controls when they are removed from the UI or hidden.

Syntax

Declaration

public sealed class FadeOutThemeAnimationpublic sealed class FadeOutThemeAnimationPublic NotInheritable Class FadeOutThemeAnimation
<FadeOutThemeAnimation ... />

Inheritance Hierarchy

Inherited Members

, , , , , , , , , , , , , , , , , , , , ,

Remarks

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 summary

Initializes a new instance of the FadeOutThemeAnimation class.

Properties summary

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

Identifies the TargetName dependency property.

Constructors

  • FadeOutThemeAnimation()
    FadeOutThemeAnimation()
    FadeOutThemeAnimation()
    FadeOutThemeAnimation()

    Initializes a new instance of the FadeOutThemeAnimation class.

    public FadeOutThemeAnimation()public FadeOutThemeAnimation()Public Function FadeOutThemeAnimation() As

Properties

  • TargetName
    TargetName
    TargetName
    TargetName

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

    public string TargetName { get; set; }public string TargetName { get; set; }Public ReadWrite Property TargetName As string
    <FadeOutThemeAnimation TargetName="nameString" />
    

    Property Value

    • string
      string
      string

      The reference name. This is typically the x:Name of the relevant element as declared in XAML.

  • TargetNameProperty
    TargetNameProperty
    TargetNameProperty
    TargetNameProperty

    Identifies the TargetName dependency property.

    public static DependencyProperty TargetNameProperty { get; }public static DependencyProperty TargetNameProperty { get; }Public Static ReadOnly Property TargetNameProperty As DependencyProperty

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.UI.Xaml.Media.Animation.dll