FadeOutThemeAnimation Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the preconfigured opacity animation that applies to controls when they are removed from the UI or hidden.
public ref class FadeOutThemeAnimation sealed : Timeline
/// [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 FadeOutThemeAnimation final : Timeline
[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 FadeOutThemeAnimation : Timeline
Public NotInheritable Class FadeOutThemeAnimation
Inherits Timeline
<FadeOutThemeAnimation ... />
- Inheritance
- Attributes
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
FadeOutThemeAnimation() |
Initializes a new instance of the FadeOutThemeAnimation 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 |
Always returns |
DispatcherQueue |
Gets the |
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) |